<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>GType</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
<link rel="start" href="index.html" title="GObject Reference Manual">
<link rel="up" href="rn01.html" title="API Reference">
<link rel="prev" href="rn01.html" title="API Reference">
<link rel="next" href="GTypePlugin.html" title="GTypePlugin">
<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="preface" href="pr01.html" title="Introduction">
<link rel="part" href="pt01.html" title="Part&#160;I.&#160;Concepts">
<link rel="chapter" href="chapter-intro.html" title="Background">
<link rel="chapter" href="chapter-gtype.html" title="The GLib Dynamic Type System">
<link rel="chapter" href="chapter-gobject.html" title="The GObject base class">
<link rel="chapter" href="chapter-signal.html" title="The GObject messaging system">
<link rel="reference" href="rn01.html" title="API Reference">
<link rel="reference" href="rn02.html" title="Tools Reference">
<link rel="part" href="pt02.html" title="Part&#160;IV.&#160;Tutorial">
<link rel="chapter" href="howto-gobject.html" title="How to define and implement a new GObject">
<link rel="chapter" href="howto-interface.html" title="How to define and implement interfaces">
<link rel="chapter" href="howto-signals.html" title="How to create and use signals">
<link rel="part" href="pt03.html" title="Part&#160;V.&#160;Related Tools">
<link rel="chapter" href="tools-gob.html" title="GObject builder">
<link rel="chapter" href="tools-ginspector.html" title="Graphical inspection of GObjects">
<link rel="chapter" href="tools-refdb.html" title="Debugging reference count problems">
<link rel="chapter" href="tools-gtkdoc.html" title="Writing API docs">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
<link rel="index" href="ix08.html" title="Index of new symbols in 2.12">
<link rel="index" href="ix09.html" title="Index of new symbols in 2.14">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="rn01.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="rn01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GObject Reference Manual</th>
<td><a accesskey="n" href="GTypePlugin.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2818537" class="shortcut">Top</a>
                  &#160;|&#160;
                  <a href="#id2820681" class="shortcut">Description</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="gobject-Type-Information"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id2818537"></a><span class="refentrytitle">GType</span>
</h2>
<p>GType &#8212; The GLib Runtime type identification and management system</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">

#include &lt;glib-object.h&gt;


typedef             <a class="link" href="gobject-Type-Information.html#GType">GType</a>;
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-FUNDAMENTAL:CAPS">G_TYPE_FUNDAMENTAL</a>                  (type)
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-FUNDAMENTAL-MAX:CAPS">G_TYPE_FUNDAMENTAL_MAX</a>
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-MAKE-FUNDAMENTAL:CAPS">G_TYPE_MAKE_FUNDAMENTAL</a>             (x)
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-IS-ABSTRACT:CAPS">G_TYPE_IS_ABSTRACT</a>                  (type)
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-IS-DERIVED:CAPS">G_TYPE_IS_DERIVED</a>                   (type)
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-IS-FUNDAMENTAL:CAPS">G_TYPE_IS_FUNDAMENTAL</a>               (type)
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-IS-VALUE-TYPE:CAPS">G_TYPE_IS_VALUE_TYPE</a>                (type)
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-HAS-VALUE-TABLE:CAPS">G_TYPE_HAS_VALUE_TABLE</a>              (type)
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-IS-CLASSED:CAPS">G_TYPE_IS_CLASSED</a>                   (type)
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-IS-INSTANTIATABLE:CAPS">G_TYPE_IS_INSTANTIATABLE</a>            (type)
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-IS-DERIVABLE:CAPS">G_TYPE_IS_DERIVABLE</a>                 (type)
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-IS-DEEP-DERIVABLE:CAPS">G_TYPE_IS_DEEP_DERIVABLE</a>            (type)
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-IS-INTERFACE:CAPS">G_TYPE_IS_INTERFACE</a>                 (type)
                    <a class="link" href="gobject-Type-Information.html#GTypeInterface">GTypeInterface</a>;
                    <a class="link" href="gobject-Type-Information.html#GTypeInstance">GTypeInstance</a>;
                    <a class="link" href="gobject-Type-Information.html#GTypeClass">GTypeClass</a>;
                    <a class="link" href="gobject-Type-Information.html#GTypeInfo">GTypeInfo</a>;
                    <a class="link" href="gobject-Type-Information.html#GTypeFundamentalInfo">GTypeFundamentalInfo</a>;
                    <a class="link" href="gobject-Type-Information.html#GInterfaceInfo">GInterfaceInfo</a>;
                    <a class="link" href="gobject-Type-Information.html#GTypeValueTable">GTypeValueTable</a>;
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-FROM-INSTANCE:CAPS">G_TYPE_FROM_INSTANCE</a>                (instance)
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-FROM-CLASS:CAPS">G_TYPE_FROM_CLASS</a>                   (g_class)
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-FROM-INTERFACE:CAPS">G_TYPE_FROM_INTERFACE</a>               (g_iface)
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-INSTANCE-GET-CLASS:CAPS">G_TYPE_INSTANCE_GET_CLASS</a>           (instance, g_type, c_type)
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-INSTANCE-GET-INTERFACE:CAPS">G_TYPE_INSTANCE_GET_INTERFACE</a>       (instance, g_type, c_type)
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-INSTANCE-GET-PRIVATE:CAPS">G_TYPE_INSTANCE_GET_PRIVATE</a>         (instance, g_type, c_type)
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-CHECK-INSTANCE:CAPS">G_TYPE_CHECK_INSTANCE</a>               (instance)
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-CHECK-INSTANCE-CAST:CAPS">G_TYPE_CHECK_INSTANCE_CAST</a>          (instance, g_type, c_type)
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-CHECK-INSTANCE-TYPE:CAPS">G_TYPE_CHECK_INSTANCE_TYPE</a>          (instance, g_type)
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-CHECK-CLASS-CAST:CAPS">G_TYPE_CHECK_CLASS_CAST</a>             (g_class, g_type, c_type)
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-CHECK-CLASS-TYPE:CAPS">G_TYPE_CHECK_CLASS_TYPE</a>             (g_class, g_type)
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-CHECK-VALUE:CAPS">G_TYPE_CHECK_VALUE</a>                  (value)
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-CHECK-VALUE-TYPE:CAPS">G_TYPE_CHECK_VALUE_TYPE</a>             (value, g_type)
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-FLAG-RESERVED-ID-BIT:CAPS">G_TYPE_FLAG_RESERVED_ID_BIT</a>
void                <a class="link" href="gobject-Type-Information.html#g-type-init">g_type_init</a>                         (void);
enum                <a class="link" href="gobject-Type-Information.html#GTypeDebugFlags">GTypeDebugFlags</a>;
void                <a class="link" href="gobject-Type-Information.html#g-type-init-with-debug-flags">g_type_init_with_debug_flags</a>        (<a class="link" href="gobject-Type-Information.html#GTypeDebugFlags">GTypeDebugFlags</a> debug_flags);
const <a
href="./../glib/glib/glib-Basic-Types.html#gchar"
>gchar</a>*        <a class="link" href="gobject-Type-Information.html#g-type-name">g_type_name</a>                         (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type);
<a
href="./../glib/glib/glib-Quarks.html#GQuark"
>GQuark</a>              <a class="link" href="gobject-Type-Information.html#g-type-qname">g_type_qname</a>                        (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type);
<a class="link" href="gobject-Type-Information.html#GType">GType</a>               <a class="link" href="gobject-Type-Information.html#g-type-from-name">g_type_from_name</a>                    (const <a
href="./../glib/glib/glib-Basic-Types.html#gchar"
>gchar</a> *name);
<a class="link" href="gobject-Type-Information.html#GType">GType</a>               <a class="link" href="gobject-Type-Information.html#g-type-parent">g_type_parent</a>                       (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type);
<a
href="./../glib/glib/glib-Basic-Types.html#guint"
>guint</a>               <a class="link" href="gobject-Type-Information.html#g-type-depth">g_type_depth</a>                        (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type);
<a class="link" href="gobject-Type-Information.html#GType">GType</a>               <a class="link" href="gobject-Type-Information.html#g-type-next-base">g_type_next_base</a>                    (<a class="link" href="gobject-Type-Information.html#GType">GType</a> leaf_type,
                                                         <a class="link" href="gobject-Type-Information.html#GType">GType</a> root_type);
<a
href="./../glib/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>            <a class="link" href="gobject-Type-Information.html#g-type-is-a">g_type_is_a</a>                         (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type,
                                                         <a class="link" href="gobject-Type-Information.html#GType">GType</a> is_a_type);
<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>            <a class="link" href="gobject-Type-Information.html#g-type-class-ref">g_type_class_ref</a>                    (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type);
<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>            <a class="link" href="gobject-Type-Information.html#g-type-class-peek">g_type_class_peek</a>                   (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type);
<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>            <a class="link" href="gobject-Type-Information.html#g-type-class-peek-static">g_type_class_peek_static</a>            (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type);
void                <a class="link" href="gobject-Type-Information.html#g-type-class-unref">g_type_class_unref</a>                  (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class);
<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>            <a class="link" href="gobject-Type-Information.html#g-type-class-peek-parent">g_type_class_peek_parent</a>            (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class);
void                <a class="link" href="gobject-Type-Information.html#g-type-class-add-private">g_type_class_add_private</a>            (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class,
                                                         <a
href="./../glib/glib/glib-Basic-Types.html#gsize"
>gsize</a> private_size);
<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>            <a class="link" href="gobject-Type-Information.html#g-type-interface-peek">g_type_interface_peek</a>               (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> instance_class,
                                                         <a class="link" href="gobject-Type-Information.html#GType">GType</a> iface_type);
<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>            <a class="link" href="gobject-Type-Information.html#g-type-interface-peek-parent">g_type_interface_peek_parent</a>        (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_iface);
<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>            <a class="link" href="gobject-Type-Information.html#g-type-default-interface-ref">g_type_default_interface_ref</a>        (<a class="link" href="gobject-Type-Information.html#GType">GType</a> g_type);
<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>            <a class="link" href="gobject-Type-Information.html#g-type-default-interface-peek">g_type_default_interface_peek</a>       (<a class="link" href="gobject-Type-Information.html#GType">GType</a> g_type);
void                <a class="link" href="gobject-Type-Information.html#g-type-default-interface-unref">g_type_default_interface_unref</a>      (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_iface);
<a class="link" href="gobject-Type-Information.html#GType">GType</a>*              <a class="link" href="gobject-Type-Information.html#g-type-children">g_type_children</a>                     (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type,
                                                         <a
href="./../glib/glib/glib-Basic-Types.html#guint"
>guint</a> *n_children);
<a class="link" href="gobject-Type-Information.html#GType">GType</a>*              <a class="link" href="gobject-Type-Information.html#g-type-interfaces">g_type_interfaces</a>                   (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type,
                                                         <a
href="./../glib/glib/glib-Basic-Types.html#guint"
>guint</a> *n_interfaces);
<a class="link" href="gobject-Type-Information.html#GType">GType</a>*              <a class="link" href="gobject-Type-Information.html#g-type-interface-prerequisites">g_type_interface_prerequisites</a>      (<a class="link" href="gobject-Type-Information.html#GType">GType</a> interface_type,
                                                         <a
href="./../glib/glib/glib-Basic-Types.html#guint"
>guint</a> *n_prerequisites);
void                <a class="link" href="gobject-Type-Information.html#g-type-set-qdata">g_type_set_qdata</a>                    (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type,
                                                         <a
href="./../glib/glib/glib-Quarks.html#GQuark"
>GQuark</a> quark,
                                                         <a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data);
<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>            <a class="link" href="gobject-Type-Information.html#g-type-get-qdata">g_type_get_qdata</a>                    (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type,
                                                         <a
href="./../glib/glib/glib-Quarks.html#GQuark"
>GQuark</a> quark);
void                <a class="link" href="gobject-Type-Information.html#g-type-query">g_type_query</a>                        (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type,
                                                         <a class="link" href="gobject-Type-Information.html#GTypeQuery">GTypeQuery</a> *query);
                    <a class="link" href="gobject-Type-Information.html#GTypeQuery">GTypeQuery</a>;
void                (<a class="link" href="gobject-Type-Information.html#GBaseInitFunc">*GBaseInitFunc</a>)                    (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class);
void                (<a class="link" href="gobject-Type-Information.html#GBaseFinalizeFunc">*GBaseFinalizeFunc</a>)                (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class);
void                (<a class="link" href="gobject-Type-Information.html#GClassInitFunc">*GClassInitFunc</a>)                   (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class,
                                                         <a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> class_data);
void                (<a class="link" href="gobject-Type-Information.html#GClassFinalizeFunc">*GClassFinalizeFunc</a>)               (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class,
                                                         <a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> class_data);
void                (<a class="link" href="gobject-Type-Information.html#GInstanceInitFunc">*GInstanceInitFunc</a>)                (<a class="link" href="gobject-Type-Information.html#GTypeInstance">GTypeInstance</a> *instance,
                                                         <a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class);
void                (<a class="link" href="gobject-Type-Information.html#GInterfaceInitFunc">*GInterfaceInitFunc</a>)               (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_iface,
                                                         <a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> iface_data);
void                (<a class="link" href="gobject-Type-Information.html#GInterfaceFinalizeFunc">*GInterfaceFinalizeFunc</a>)           (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_iface,
                                                         <a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> iface_data);
<a
href="./../glib/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>            (<a class="link" href="gobject-Type-Information.html#GTypeClassCacheFunc">*GTypeClassCacheFunc</a>)              (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> cache_data,
                                                         <a class="link" href="gobject-Type-Information.html#GTypeClass">GTypeClass</a> *g_class);
enum                <a class="link" href="gobject-Type-Information.html#GTypeFlags">GTypeFlags</a>;
enum                <a class="link" href="gobject-Type-Information.html#GTypeFundamentalFlags">GTypeFundamentalFlags</a>;
<a class="link" href="gobject-Type-Information.html#GType">GType</a>               <a class="link" href="gobject-Type-Information.html#g-type-register-static">g_type_register_static</a>              (<a class="link" href="gobject-Type-Information.html#GType">GType</a> parent_type,
                                                         const <a
href="./../glib/glib/glib-Basic-Types.html#gchar"
>gchar</a> *type_name,
                                                         const <a class="link" href="gobject-Type-Information.html#GTypeInfo">GTypeInfo</a> *info,
                                                         <a class="link" href="gobject-Type-Information.html#GTypeFlags">GTypeFlags</a> flags);
<a class="link" href="gobject-Type-Information.html#GType">GType</a>               <a class="link" href="gobject-Type-Information.html#g-type-register-static-simple">g_type_register_static_simple</a>       (<a class="link" href="gobject-Type-Information.html#GType">GType</a> parent_type,
                                                         const <a
href="./../glib/glib/glib-Basic-Types.html#gchar"
>gchar</a> *type_name,
                                                         <a
href="./../glib/glib/glib-Basic-Types.html#guint"
>guint</a> class_size,
                                                         <a class="link" href="gobject-Type-Information.html#GClassInitFunc">GClassInitFunc</a> class_init,
                                                         <a
href="./../glib/glib/glib-Basic-Types.html#guint"
>guint</a> instance_size,
                                                         <a class="link" href="gobject-Type-Information.html#GInstanceInitFunc">GInstanceInitFunc</a> instance_init,
                                                         <a class="link" href="gobject-Type-Information.html#GTypeFlags">GTypeFlags</a> flags);
<a class="link" href="gobject-Type-Information.html#GType">GType</a>               <a class="link" href="gobject-Type-Information.html#g-type-register-dynamic">g_type_register_dynamic</a>             (<a class="link" href="gobject-Type-Information.html#GType">GType</a> parent_type,
                                                         const <a
href="./../glib/glib/glib-Basic-Types.html#gchar"
>gchar</a> *type_name,
                                                         <a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin,
                                                         <a class="link" href="gobject-Type-Information.html#GTypeFlags">GTypeFlags</a> flags);
<a class="link" href="gobject-Type-Information.html#GType">GType</a>               <a class="link" href="gobject-Type-Information.html#g-type-register-fundamental">g_type_register_fundamental</a>         (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type_id,
                                                         const <a
href="./../glib/glib/glib-Basic-Types.html#gchar"
>gchar</a> *type_name,
                                                         const <a class="link" href="gobject-Type-Information.html#GTypeInfo">GTypeInfo</a> *info,
                                                         const <a class="link" href="gobject-Type-Information.html#GTypeFundamentalInfo">GTypeFundamentalInfo</a> *finfo,
                                                         <a class="link" href="gobject-Type-Information.html#GTypeFlags">GTypeFlags</a> flags);
void                <a class="link" href="gobject-Type-Information.html#g-type-add-interface-static">g_type_add_interface_static</a>         (<a class="link" href="gobject-Type-Information.html#GType">GType</a> instance_type,
                                                         <a class="link" href="gobject-Type-Information.html#GType">GType</a> interface_type,
                                                         const <a class="link" href="gobject-Type-Information.html#GInterfaceInfo">GInterfaceInfo</a> *info);
void                <a class="link" href="gobject-Type-Information.html#g-type-add-interface-dynamic">g_type_add_interface_dynamic</a>        (<a class="link" href="gobject-Type-Information.html#GType">GType</a> instance_type,
                                                         <a class="link" href="gobject-Type-Information.html#GType">GType</a> interface_type,
                                                         <a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin);
void                <a class="link" href="gobject-Type-Information.html#g-type-interface-add-prerequisite">g_type_interface_add_prerequisite</a>   (<a class="link" href="gobject-Type-Information.html#GType">GType</a> interface_type,
                                                         <a class="link" href="gobject-Type-Information.html#GType">GType</a> prerequisite_type);
<a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a>*        <a class="link" href="gobject-Type-Information.html#g-type-get-plugin">g_type_get_plugin</a>                   (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type);
<a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a>*        <a class="link" href="gobject-Type-Information.html#g-type-interface-get-plugin">g_type_interface_get_plugin</a>         (<a class="link" href="gobject-Type-Information.html#GType">GType</a> instance_type,
                                                         <a class="link" href="gobject-Type-Information.html#GType">GType</a> interface_type);
<a class="link" href="gobject-Type-Information.html#GType">GType</a>               <a class="link" href="gobject-Type-Information.html#g-type-fundamental-next">g_type_fundamental_next</a>             (void);
<a class="link" href="gobject-Type-Information.html#GType">GType</a>               <a class="link" href="gobject-Type-Information.html#g-type-fundamental">g_type_fundamental</a>                  (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type_id);
<a class="link" href="gobject-Type-Information.html#GTypeInstance">GTypeInstance</a>*      <a class="link" href="gobject-Type-Information.html#g-type-create-instance">g_type_create_instance</a>              (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type);
void                <a class="link" href="gobject-Type-Information.html#g-type-free-instance">g_type_free_instance</a>                (<a class="link" href="gobject-Type-Information.html#GTypeInstance">GTypeInstance</a> *instance);
void                <a class="link" href="gobject-Type-Information.html#g-type-add-class-cache-func">g_type_add_class_cache_func</a>         (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> cache_data,
                                                         <a class="link" href="gobject-Type-Information.html#GTypeClassCacheFunc">GTypeClassCacheFunc</a> cache_func);
void                <a class="link" href="gobject-Type-Information.html#g-type-remove-class-cache-func">g_type_remove_class_cache_func</a>      (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> cache_data,
                                                         <a class="link" href="gobject-Type-Information.html#GTypeClassCacheFunc">GTypeClassCacheFunc</a> cache_func);
void                <a class="link" href="gobject-Type-Information.html#g-type-class-unref-uncached">g_type_class_unref_uncached</a>         (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class);
void                <a class="link" href="gobject-Type-Information.html#g-type-add-interface-check">g_type_add_interface_check</a>          (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> check_data,
                                                         <a class="link" href="gobject-Type-Information.html#GTypeInterfaceCheckFunc">GTypeInterfaceCheckFunc</a> check_func);
void                <a class="link" href="gobject-Type-Information.html#g-type-remove-interface-check">g_type_remove_interface_check</a>       (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> check_data,
                                                         <a class="link" href="gobject-Type-Information.html#GTypeInterfaceCheckFunc">GTypeInterfaceCheckFunc</a> check_func);
void                (<a class="link" href="gobject-Type-Information.html#GTypeInterfaceCheckFunc">*GTypeInterfaceCheckFunc</a>)          (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> check_data,
                                                         <a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_iface);
<a class="link" href="gobject-Type-Information.html#GTypeValueTable">GTypeValueTable</a>*    <a class="link" href="gobject-Type-Information.html#g-type-value-table-peek">g_type_value_table_peek</a>             (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type);
#define             <a class="link" href="gobject-Type-Information.html#G-DEFINE-TYPE:CAPS">G_DEFINE_TYPE</a>                       (TN, t_n, T_P)
#define             <a class="link" href="gobject-Type-Information.html#G-DEFINE-TYPE-WITH-CODE:CAPS">G_DEFINE_TYPE_WITH_CODE</a>             (TN, t_n, T_P, _C_)
#define             <a class="link" href="gobject-Type-Information.html#G-DEFINE-ABSTRACT-TYPE:CAPS">G_DEFINE_ABSTRACT_TYPE</a>              (TN, t_n, T_P)
#define             <a class="link" href="gobject-Type-Information.html#G-DEFINE-ABSTRACT-TYPE-WITH-CODE:CAPS">G_DEFINE_ABSTRACT_TYPE_WITH_CODE</a>    (TN, t_n, T_P, _C_)
#define             <a class="link" href="gobject-Type-Information.html#G-IMPLEMENT-INTERFACE:CAPS">G_IMPLEMENT_INTERFACE</a>               (TYPE_IFACE, iface_init)
#define             <a class="link" href="gobject-Type-Information.html#G-DEFINE-TYPE-EXTENDED:CAPS">G_DEFINE_TYPE_EXTENDED</a>              (TN, t_n, T_P, _f_, _C_)


#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-INVALID:CAPS">G_TYPE_INVALID</a>
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-NONE:CAPS">G_TYPE_NONE</a>
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-INTERFACE:CAPS">G_TYPE_INTERFACE</a>
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-CHAR:CAPS">G_TYPE_CHAR</a>
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-UCHAR:CAPS">G_TYPE_UCHAR</a>
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-BOOLEAN:CAPS">G_TYPE_BOOLEAN</a>
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-INT:CAPS">G_TYPE_INT</a>
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-UINT:CAPS">G_TYPE_UINT</a>
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-LONG:CAPS">G_TYPE_LONG</a>
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-ULONG:CAPS">G_TYPE_ULONG</a>
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-INT64:CAPS">G_TYPE_INT64</a>
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-UINT64:CAPS">G_TYPE_UINT64</a>
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-ENUM:CAPS">G_TYPE_ENUM</a>
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-FLAGS:CAPS">G_TYPE_FLAGS</a>
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-FLOAT:CAPS">G_TYPE_FLOAT</a>
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-DOUBLE:CAPS">G_TYPE_DOUBLE</a>
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-STRING:CAPS">G_TYPE_STRING</a>
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-POINTER:CAPS">G_TYPE_POINTER</a>
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-BOXED:CAPS">G_TYPE_BOXED</a>
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-PARAM:CAPS">G_TYPE_PARAM</a>
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-OBJECT:CAPS">G_TYPE_OBJECT</a>
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-GTYPE:CAPS">G_TYPE_GTYPE</a>

#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-RESERVED-GLIB-FIRST:CAPS">G_TYPE_RESERVED_GLIB_FIRST</a>
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-RESERVED-GLIB-LAST:CAPS">G_TYPE_RESERVED_GLIB_LAST</a>
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-RESERVED-BSE-FIRST:CAPS">G_TYPE_RESERVED_BSE_FIRST</a>
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-RESERVED-BSE-LAST:CAPS">G_TYPE_RESERVED_BSE_LAST</a>
#define             <a class="link" href="gobject-Type-Information.html#G-TYPE-RESERVED-USER-FIRST:CAPS">G_TYPE_RESERVED_USER_FIRST</a>

</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2820681"></a><h2>Description</h2>
<p>
The GType API is the foundation of the GObject system.  It provides the
facilities for registering and managing all fundamental data types,
user-defined object and interface types.  Before using any GType
or GObject functions, <a class="link" href="gobject-Type-Information.html#g-type-init"><code class="function">g_type_init()</code></a> must be called to initialize the
type system.
</p>
<p>
For type creation and registration purposes, all types fall into one of
two categories: static or dynamic.  Static types are never loaded or
unloaded at run-time as dynamic types may be.  Static types are created
with <a class="link" href="gobject-Type-Information.html#g-type-register-static"><code class="function">g_type_register_static()</code></a> that gets type specific information passed
in via a <a class="link" href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> structure.
Dynamic types are created with <a class="link" href="gobject-Type-Information.html#g-type-register-dynamic"><code class="function">g_type_register_dynamic()</code></a> which takes a
<a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure instead. The remaining type information (the
<a class="link" href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> structure) is retrieved during runtime through <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a>
and the g_type_plugin_*() API.
These registration functions are usually called only once from a 
function whose only purpose is to return the type identifier for a 
specific class.  Once the type (or class or interface) is registered,
it may be instantiated, inherited, or implemented depending on exactly
what sort of type it is.
There is also a third registration function for registering fundamental
types called <a class="link" href="gobject-Type-Information.html#g-type-register-fundamental"><code class="function">g_type_register_fundamental()</code></a> which requires both a <a class="link" href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a>
structure and a <a class="link" href="gobject-Type-Information.html#GTypeFundamentalInfo"><span class="type">GTypeFundamentalInfo</span></a> structure but it is seldom used
since most fundamental types are predefined rather than user-defined.
</p>
<p>
A final word about type names.
Such an identifier needs to be at least three characters long. There is no
upper length limit. The first character needs to be a letter (a-z or A-Z)
or an underscore '_'. Subsequent characters can be letters, numbers or
any of '-_+'.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2818427"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2818437"></a><h3>
<a name="GType"></a>GType</h3>
<a class="indexterm" name="id2818449"></a><p>
A numerical value which represents the unique identifier of a registered
type.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2818460"></a><h3>
<a name="G-TYPE-FUNDAMENTAL:CAPS"></a>G_TYPE_FUNDAMENTAL()</h3>
<a class="indexterm" name="id2818472"></a><pre class="programlisting">#define G_TYPE_FUNDAMENTAL(type)	(g_type_fundamental (type))
</pre>
<p>
Returns the fundamental type which is the ancestor of <em class="parameter"><code>type</code></em>.
Fundamental types are types that serve as ultimate bases for the derived types, 
thus they are the roots of distinct inheritance hierarchies.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></p></td>
<td>A <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2821056"></a><h3>
<a name="G-TYPE-FUNDAMENTAL-MAX:CAPS"></a>G_TYPE_FUNDAMENTAL_MAX</h3>
<a class="indexterm" name="id2821068"></a><pre class="programlisting">#define	G_TYPE_FUNDAMENTAL_MAX		(255 &lt;&lt; G_TYPE_FUNDAMENTAL_SHIFT)
</pre>
<p>
An integer constant that represents the number of identifiers reserved
for types that are assigned at compile-time.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2821086"></a><h3>
<a name="G-TYPE-MAKE-FUNDAMENTAL:CAPS"></a>G_TYPE_MAKE_FUNDAMENTAL()</h3>
<a class="indexterm" name="id2821100"></a><pre class="programlisting">#define	G_TYPE_MAKE_FUNDAMENTAL(x)	((GType) ((x) &lt;&lt; G_TYPE_FUNDAMENTAL_SHIFT))
</pre>
<p>
Returns the type ID for the fundamental type number <em class="parameter"><code>x</code></em>.
Use <a class="link" href="gobject-Type-Information.html#g-type-fundamental-next"><code class="function">g_type_fundamental_next()</code></a> instead of this macro to create new fundamental 
types.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></p></td>
<td>the fundamental type number.


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2821152"></a><h3>
<a name="G-TYPE-IS-ABSTRACT:CAPS"></a>G_TYPE_IS_ABSTRACT()</h3>
<a class="indexterm" name="id2821166"></a><pre class="programlisting">#define G_TYPE_IS_ABSTRACT(type)                (g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT))
</pre>
<p>
Returns <a
href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>type</code></em> is an abstract type.  An abstract type can not be
instantiated and is normally used as an abstract base class for
derived classes.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></p></td>
<td>A <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2821228"></a><h3>
<a name="G-TYPE-IS-DERIVED:CAPS"></a>G_TYPE_IS_DERIVED()</h3>
<a class="indexterm" name="id2821241"></a><pre class="programlisting">#define G_TYPE_IS_DERIVED(type)                 ((type) &gt; G_TYPE_FUNDAMENTAL_MAX)
</pre>
<p>
Returns <a
href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>type</code></em> is derived (or in object-oriented terminology:
inherited) from another type (this holds true for all non-fundamental
types).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></p></td>
<td>A <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2821302"></a><h3>
<a name="G-TYPE-IS-FUNDAMENTAL:CAPS"></a>G_TYPE_IS_FUNDAMENTAL()</h3>
<a class="indexterm" name="id2821315"></a><pre class="programlisting">#define G_TYPE_IS_FUNDAMENTAL(type)             ((type) &lt;= G_TYPE_FUNDAMENTAL_MAX)
</pre>
<p>
Returns <a
href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>type</code></em> is a fundamental type.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></p></td>
<td>A <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2821374"></a><h3>
<a name="G-TYPE-IS-VALUE-TYPE:CAPS"></a>G_TYPE_IS_VALUE_TYPE()</h3>
<a class="indexterm" name="id2821388"></a><pre class="programlisting">#define G_TYPE_IS_VALUE_TYPE(type)              (g_type_check_is_value_type (type))
</pre>
<p>
Returns <a
href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>type</code></em> is a value type and can be used with
<a class="link" href="gobject-Generic-values.html#g-value-init"><code class="function">g_value_init()</code></a>. 
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></p></td>
<td>A <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2821458"></a><h3>
<a name="G-TYPE-HAS-VALUE-TABLE:CAPS"></a>G_TYPE_HAS_VALUE_TABLE()</h3>
<a class="indexterm" name="id2821471"></a><pre class="programlisting">#define G_TYPE_HAS_VALUE_TABLE(type)            (g_type_value_table_peek (type) != NULL)
</pre>
<p>
Returns <a
href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>type</code></em> has a <a class="link" href="gobject-Type-Information.html#GTypeValueTable"><span class="type">GTypeValueTable</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></p></td>
<td>A <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2821536"></a><h3>
<a name="G-TYPE-IS-CLASSED:CAPS"></a>G_TYPE_IS_CLASSED()</h3>
<a class="indexterm" name="id2821550"></a><pre class="programlisting">#define G_TYPE_IS_CLASSED(type)                 (g_type_test_flags ((type), G_TYPE_FLAG_CLASSED))
</pre>
<p>
Returns <a
href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>type</code></em> is a classed type.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></p></td>
<td>A <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2821608"></a><h3>
<a name="G-TYPE-IS-INSTANTIATABLE:CAPS"></a>G_TYPE_IS_INSTANTIATABLE()</h3>
<a class="indexterm" name="id2821622"></a><pre class="programlisting">#define G_TYPE_IS_INSTANTIATABLE(type)          (g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE))
</pre>
<p>
Returns <a
href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>type</code></em> can be instantiated.  Instantiation is the
process of creating an instance (object) of this type.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></p></td>
<td>A <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2821683"></a><h3>
<a name="G-TYPE-IS-DERIVABLE:CAPS"></a>G_TYPE_IS_DERIVABLE()</h3>
<a class="indexterm" name="id2821696"></a><pre class="programlisting">#define G_TYPE_IS_DERIVABLE(type)               (g_type_test_flags ((type), G_TYPE_FLAG_DERIVABLE))
</pre>
<p>
Returns <a
href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>type</code></em> is a derivable type.  A derivable type can
be used as the base class of a flat (single-level) class hierarchy.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></p></td>
<td>A <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2821757"></a><h3>
<a name="G-TYPE-IS-DEEP-DERIVABLE:CAPS"></a>G_TYPE_IS_DEEP_DERIVABLE()</h3>
<a class="indexterm" name="id2821770"></a><pre class="programlisting">#define G_TYPE_IS_DEEP_DERIVABLE(type)          (g_type_test_flags ((type), G_TYPE_FLAG_DEEP_DERIVABLE))
</pre>
<p>
Returns <a
href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>type</code></em> is a deep derivable type.  A deep derivable type
can be used as the base class of a deep (multi-level) class hierarchy.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></p></td>
<td>A <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2821831"></a><h3>
<a name="G-TYPE-IS-INTERFACE:CAPS"></a>G_TYPE_IS_INTERFACE()</h3>
<a class="indexterm" name="id2821843"></a><pre class="programlisting">#define G_TYPE_IS_INTERFACE(type)               (G_TYPE_FUNDAMENTAL (type) == G_TYPE_INTERFACE)
</pre>
<p>
Returns <a
href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>type</code></em> is an interface type.
An interface type provides a pure API, the implementation
of which is provided by another type (which is then said to conform
to the interface).  GLib interfaces are somewhat analogous to Java
interfaces and C++ classes containing only pure virtual functions, 
with the difference that GType interfaces are not derivable (but see
<a class="link" href="gobject-Type-Information.html#g-type-interface-add-prerequisite"><code class="function">g_type_interface_add_prerequisite()</code></a> for an alternative).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></p></td>
<td>A <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2821919"></a><h3>
<a name="GTypeInterface"></a>GTypeInterface</h3>
<a class="indexterm" name="id2821931"></a><pre class="programlisting">typedef struct {
} GTypeInterface;
</pre>
<p>
An opaque structure used as the base of all interface types.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2821948"></a><h3>
<a name="GTypeInstance"></a>GTypeInstance</h3>
<a class="indexterm" name="id2821960"></a><pre class="programlisting">typedef struct {
} GTypeInstance;
</pre>
<p>
An opaque structure used as the base of all type instances.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2821977"></a><h3>
<a name="GTypeClass"></a>GTypeClass</h3>
<a class="indexterm" name="id2821989"></a><pre class="programlisting">typedef struct {
} GTypeClass;
</pre>
<p>
An opaque structure used as the base of all classes.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2822006"></a><h3>
<a name="GTypeInfo"></a>GTypeInfo</h3>
<a class="indexterm" name="id2822018"></a><pre class="programlisting">typedef struct {
  /* interface types, classed types, instantiated types */
  guint16                class_size;
  
  GBaseInitFunc          base_init;
  GBaseFinalizeFunc      base_finalize;
  
  /* interface types, classed types, instantiated types */
  GClassInitFunc         class_init;
  GClassFinalizeFunc     class_finalize;
  gconstpointer          class_data;
  
  /* instantiated types */
  guint16                instance_size;
  guint16                n_preallocs;
  GInstanceInitFunc      instance_init;
  
  /* value handling */
  const GTypeValueTable	*value_table;
} GTypeInfo;
</pre>
<p>
This structure is used to provide the type system with the information
required to initialize and destruct (finalize) a type's class and
its instances.
The initialized structure is passed to the <a class="link" href="gobject-Type-Information.html#g-type-register-static"><code class="function">g_type_register_static()</code></a> function
(or is copied into the provided <a class="link" href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> structure in the
<a class="link" href="GTypePlugin.html#g-type-plugin-complete-type-info"><code class="function">g_type_plugin_complete_type_info()</code></a>). The type system will perform a deep
copy of this structure, so its memory does not need to be persistent
across invocation of <a class="link" href="gobject-Type-Information.html#g-type-register-static"><code class="function">g_type_register_static()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a
href="./../glib/glib/glib-Basic-Types.html#guint16"
>guint16</a>&#160;<em class="structfield"><code>class_size</code></em>;</span></p></td>
<td>	 Size of the class structure (required for interface, classed and instantiatable types).
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="gobject-Type-Information.html#GBaseInitFunc">GBaseInitFunc</a>&#160;<em class="structfield"><code>base_init</code></em>;</span></p></td>
<td>	 Location of the base initialization function (optional).
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="gobject-Type-Information.html#GBaseFinalizeFunc">GBaseFinalizeFunc</a>&#160;<em class="structfield"><code>base_finalize</code></em>;</span></p></td>
<td> Location of the base finalization function (optional).
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="gobject-Type-Information.html#GClassInitFunc">GClassInitFunc</a>&#160;<em class="structfield"><code>class_init</code></em>;</span></p></td>
<td>	 Location of the class initialization function for
  classed and types. Location of the default vtable inititalization
  function for interface types. (optional) This function is used both
  to fill in virtual functions in the class or default vtable, and
  to do type-specific setup such as registering signals and object
  properties.
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="gobject-Type-Information.html#GClassFinalizeFunc">GClassFinalizeFunc</a>&#160;<em class="structfield"><code>class_finalize</code></em>;</span></p></td>
<td>Location of the class finalization function for
  classed and types. Location fo the default vtable finalization
  function for interface types. (optional)
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="./../glib/glib/glib-Basic-Types.html#gconstpointer"
>gconstpointer</a>&#160;<em class="structfield"><code>class_data</code></em>;</span></p></td>
<td>	 User-supplied data passed to the class init/finalize functions.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="./../glib/glib/glib-Basic-Types.html#guint16"
>guint16</a>&#160;<em class="structfield"><code>instance_size</code></em>;</span></p></td>
<td> Size of the instance (object) structure (required for instantiatable types only).
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="./../glib/glib/glib-Basic-Types.html#guint16"
>guint16</a>&#160;<em class="structfield"><code>n_preallocs</code></em>;</span></p></td>
<td>	 Prior to GLib 2.10, it specified the number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Since GLib 2.10, it is ignored, since instances are allocated with the <a
href="./../glib/glib/glib-Memory-Slices.html"
>slice allocator</a> now.
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="gobject-Type-Information.html#GInstanceInitFunc">GInstanceInitFunc</a>&#160;<em class="structfield"><code>instance_init</code></em>;</span></p></td>
<td> Location of the instance initialization function (optional, for instantiatable types only).
</td>
</tr>
<tr>
<td><p><span class="term">const&#160;<a class="link" href="gobject-Type-Information.html#GTypeValueTable">GTypeValueTable</a>&#160;*<em class="structfield"><code>value_table</code></em>;</span></p></td>
<td>	 A <a class="link" href="gobject-Type-Information.html#GTypeValueTable"><span class="type">GTypeValueTable</span></a> function table for generic handling of GValues of this type (usually only
		 useful for fundamental types).

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2822342"></a><h3>
<a name="GTypeFundamentalInfo"></a>GTypeFundamentalInfo</h3>
<a class="indexterm" name="id2822355"></a><pre class="programlisting">typedef struct {
  GTypeFundamentalFlags  type_flags;
} GTypeFundamentalInfo;
</pre>
<p>
A structure that provides information to the type system which is
used specifically for managing fundamental types.  
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><a class="link" href="gobject-Type-Information.html#GTypeFundamentalFlags">GTypeFundamentalFlags</a>&#160;<em class="structfield"><code>type_flags</code></em>;</span></p></td>
<td>
<a class="link" href="gobject-Type-Information.html#GTypeFundamentalFlags"><span class="type">GTypeFundamentalFlags</span></a> describing the characteristics of the fundamental type

</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2822407"></a><h3>
<a name="GInterfaceInfo"></a>GInterfaceInfo</h3>
<a class="indexterm" name="id2822420"></a><pre class="programlisting">typedef struct {
  GInterfaceInitFunc     interface_init;
  GInterfaceFinalizeFunc interface_finalize;
  gpointer               interface_data;
} GInterfaceInfo;
</pre>
<p>
A structure that provides information to the type system which is
used specifically for managing interface types.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a class="link" href="gobject-Type-Information.html#GInterfaceInitFunc">GInterfaceInitFunc</a>&#160;<em class="structfield"><code>interface_init</code></em>;</span></p></td>
<td>location of the interface initialization function
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="gobject-Type-Information.html#GInterfaceFinalizeFunc">GInterfaceFinalizeFunc</a>&#160;<em class="structfield"><code>interface_finalize</code></em>;</span></p></td>
<td>location of the interface finalization function
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>&#160;<em class="structfield"><code>interface_data</code></em>;</span></p></td>
<td>user-supplied data passed to the interface init/finalize functions

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2822508"></a><h3>
<a name="GTypeValueTable"></a>GTypeValueTable</h3>
<a class="indexterm" name="id2822521"></a><pre class="programlisting">typedef struct {
  void     (*value_init)         (GValue       *value);
  void     (*value_free)         (GValue       *value);
  void     (*value_copy)         (const GValue *src_value,
				  GValue       *dest_value);
  /* varargs functionality (optional) */
  gpointer (*value_peek_pointer) (const GValue *value);
  gchar	    *collect_format;
  gchar*   (*collect_value)      (GValue       *value,
				  guint         n_collect_values,
				  GTypeCValue  *collect_values,
				  guint		collect_flags);
  gchar	    *lcopy_format;
  gchar*   (*lcopy_value)        (const GValue *value,
				  guint         n_collect_values,
				  GTypeCValue  *collect_values,
				  guint		collect_flags);
} GTypeValueTable;
</pre>
<p>
The <a class="link" href="gobject-Type-Information.html#GTypeValueTable"><span class="type">GTypeValueTable</span></a> provides the functions required by the <a class="link" href="gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> implementation,
to serve as a container for values of a type.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="structfield"><code>value_init</code></em>&#160;()</span></p></td>
<td>		Default initialize <em class="parameter"><code>values</code></em> contents by poking values
			directly into the value-&gt;data array. The data array of
			the <a class="link" href="gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> passed into this function was zero-filled
			with <code class="function"><code class="function">memset()</code></code>, so no care has to
                        be taken to free any
			old contents. E.g. for the implementation of a string
			value that may never be <a
href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>, the implementation might
			look like:
<pre class="programlisting">
{
  value-&gt;data[0].v_pointer = g_strdup ("");
}
</pre>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code>value_free</code></em>&#160;()</span></p></td>
<td>		Free any old contents that might be left in the
			data array of the passed in <em class="parameter"><code>value</code></em>. No resources may
			remain allocated through the <a class="link" href="gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> contents after
			this function returns. E.g. for our above string type:
<pre class="programlisting">
{
  /* only free strings without a specific flag for static storage */
  if (!(value-&gt;data[1].v_uint &amp; G_VALUE_NOCOPY_CONTENTS))
    g_free (value-&gt;data[0].v_pointer);
}
</pre>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code>value_copy</code></em>&#160;()</span></p></td>
<td>		<em class="parameter"><code>dest_value</code></em> is a <a class="link" href="gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> with zero-filled data section
			and <em class="parameter"><code>src_value</code></em> is a properly setup <a class="link" href="gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> of same or
			derived type.
			The purpose of this function is to copy the contents of
			<em class="parameter"><code>src_value</code></em> into <em class="parameter"><code>dest_value</code></em> in a way, that even after
			<em class="parameter"><code>src_value</code></em> has been freed, the contents of <em class="parameter"><code>dest_value</code></em>
			remain valid. String type example:
<pre class="programlisting">
{
  dest_value-&gt;data[0].v_pointer = g_strdup (src_value-&gt;data[0].v_pointer);
}
</pre>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code>value_peek_pointer</code></em>&#160;()</span></p></td>
<td>	If the value contents fit into a pointer, such as objects
			or strings, return this pointer, so the caller can peek at
			the current contents. To extend on our above string example:
<pre class="programlisting">
{
  return value-&gt;data[0].v_pointer;
}
</pre>
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="./../glib/glib/glib-Basic-Types.html#gchar"
>gchar</a>&#160;*<em class="structfield"><code>collect_format</code></em>;</span></p></td>
<td>	A string format describing how to collect the contents of
			this value bit-by-bit. Each character in the format represents
			an argument to be collected, and the characters themselves indicate
			the type of the argument. Currently supported arguments are:
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"></span></p></td>
<td><p>
        'i' - Integers. passed as collect_values[].v_int.
  </p></td>
</tr>
<tr>
<td><p><span class="term"></span></p></td>
<td><p>
        'l' - Longs. passed as collect_values[].v_long.
  </p></td>
</tr>
<tr>
<td><p><span class="term"></span></p></td>
<td><p>
        'd' - Doubles. passed as collect_values[].v_double.
  </p></td>
</tr>
<tr>
<td><p><span class="term"></span></p></td>
<td><p>
        'p' - Pointers. passed as collect_values[].v_pointer.
  </p></td>
</tr>
</tbody>
</table></div>
			It should be noted that for variable argument list construction,
			ANSI C promotes every type smaller than an integer to an int, and
			floats to doubles. So for collection of short int or char, 'i'
			needs to be used, and for collection of floats 'd'.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code>collect_value</code></em>&#160;()</span></p></td>
<td>	The <code class="function">collect_value()</code> function is responsible for converting the
			values collected from a variable argument list into contents
			suitable for storage in a GValue. This function should setup
			<em class="parameter"><code>value</code></em> similar to <code class="function">value_init()</code>; e.g. for a string value that
			does not allow <a
href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> pointers, it needs to either spew an error,
			or do an implicit conversion by storing an empty string.
			The <em class="parameter"><code>value</code></em> passed in to this function has a zero-filled data
			array, so just like for <code class="function">value_init()</code> it is guaranteed to not
			contain any old contents that might need freeing.
			<em class="parameter"><code>n_collect_values</code></em> is exactly the string length of <em class="parameter"><code>collect_format</code></em>,
			and <em class="parameter"><code>collect_values</code></em> is an array of unions <a class="link" href="gobject-Varargs-Value-Collection.html#GTypeCValue"><span class="type">GTypeCValue</span></a> with
			length <em class="parameter"><code>n_collect_values</code></em>, containing the collected values
			according to <em class="parameter"><code>collect_format</code></em>.
			<em class="parameter"><code>collect_flags</code></em> is an argument provided as a hint by the caller.
			It may contain the flag <span class="type">G_VALUE_NOCOPY_CONTENTS</span> indicating,
			that the collected value contents may be considered "static"
			for the duration of the <em class="parameter"><code>value</code></em> lifetime.
			Thus an extra copy of the contents stored in <em class="parameter"><code>collect_values</code></em> is
			not required for assignment to <em class="parameter"><code>value</code></em>.
			For our above string example, we continue with:
<pre class="programlisting">
{
  if (!collect_values[0].v_pointer)
    value-&gt;data[0].v_pointer = g_strdup ("");
  else if (collect_flags &amp; G_VALUE_NOCOPY_CONTENTS)
    {
      value-&gt;data[0].v_pointer = collect_values[0].v_pointer;
      /* keep a flag for the value_free() implementation to not free this string */
      value-&gt;data[1].v_uint = G_VALUE_NOCOPY_CONTENTS;
    }
  else
    value-&gt;data[0].v_pointer = g_strdup (collect_values[0].v_pointer);

  return NULL;
}
</pre>
			It should be noted, that it is generally a bad idea to follow the
			<span class="type">G_VALUE_NOCOPY_CONTENTS</span> hint for reference counted types. Due to
			reentrancy requirements and reference count assertions performed
			by the <span class="type">GSignal</span> code, reference counts should always be incremented
			for reference counted contents stored in the value-&gt;data array.
			To deviate from our string example for a moment, and taking a look
			at an exemplary implementation for <code class="function">collect_value()</code> of <span class="type">""</span>
<pre class="programlisting">
{
  if (collect_values[0].v_pointer)
    {
      GObject *object = G_OBJECT (collect_values[0].v_pointer);

      /* never honour G_VALUE_NOCOPY_CONTENTS for ref-counted types */
      value-&gt;data[0].v_pointer = g_object_ref (object);
      return NULL;
    }
  else
    return g_strdup_printf ("Object passed as invalid NULL pointer");
}
</pre>
			The reference count for valid objects is always incremented,
			regardless of <em class="parameter"><code>collect_flags</code></em>. For invalid objects, the example
			returns a newly allocated string without altering <em class="parameter"><code>value</code></em>.
			Upon success, <code class="function">collect_value()</code> needs to return <a
href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>. If, however,
			an error condition occurred, <code class="function">collect_value()</code> may spew an
			error by returning a newly allocated non-<a
href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> string, giving
			a suitable description of the error condition.
			The calling code makes no assumptions about the <em class="parameter"><code>value</code></em>
			contents being valid upon error returns, <em class="parameter"><code>value</code></em>
			is simply thrown away without further freeing. As such, it is
			a good idea to not allocate <a class="link" href="gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> contents, prior to returning
			an error, however, <code class="function">collect_values()</code> is not obliged to return
			a correctly setup <em class="parameter"><code>value</code></em> for error returns, simply because
			any non-<a
href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> return is considered a fatal condition so further
			program behaviour is undefined.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="./../glib/glib/glib-Basic-Types.html#gchar"
>gchar</a>&#160;*<em class="structfield"><code>lcopy_format</code></em>;</span></p></td>
<td>		Format description of the arguments to collect for <em class="parameter"><code>lcopy_value</code></em>,
			analogous to <em class="parameter"><code>collect_format</code></em>. Usually, <em class="parameter"><code>lcopy_format</code></em> string consists
			only of 'p's to provide <code class="function">lcopy_value()</code> with pointers to storage locations.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code>lcopy_value</code></em>&#160;()</span></p></td>
<td>		This function is responsible for storing the <em class="parameter"><code>value</code></em> contents into
			arguments passed through a variable argument list which got
			collected into <em class="parameter"><code>collect_values</code></em> according to <em class="parameter"><code>lcopy_format</code></em>.
			<em class="parameter"><code>n_collect_values</code></em> equals the string length of <em class="parameter"><code>lcopy_format</code></em>,
			and <em class="parameter"><code>collect_flags</code></em> may contain <span class="type">G_VALUE_NOCOPY_CONTENTS</span>.
			In contrast to <code class="function">collect_value()</code>, <code class="function">lcopy_value()</code> is obliged to
			always properly support <span class="type">G_VALUE_NOCOPY_CONTENTS</span>.
			Similar to <code class="function">collect_value()</code> the function may prematurely abort
			by returning a newly allocated string describing an error condition.
			To complete the string example:
<pre class="programlisting">
{
  gchar **string_p = collect_values[0].v_pointer;

  if (!string_p)
    return g_strdup_printf ("string location passed as NULL");

  if (collect_flags &amp; G_VALUE_NOCOPY_CONTENTS)
    *string_p = value-&gt;data[0].v_pointer;
  else
    *string_p = g_strdup (value-&gt;data[0].v_pointer);

}
</pre>
			And an illustrative version of <code class="function">lcopy_value()</code> for
			reference-counted types:
<pre class="programlisting">
{
  GObject **object_p = collect_values[0].v_pointer;

  if (!object_p)
    return g_strdup_printf ("object location passed as NULL");
  if (!value-&gt;data[0].v_pointer)
    *object_p = NULL;
  else if (collect_flags &amp; G_VALUE_NOCOPY_CONTENTS) /* always honour */
    *object_p = value-&gt;data[0].v_pointer;
  else
    *object_p = g_object_ref (value-&gt;data[0].v_pointer);
  return NULL;
}
</pre>

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2823395"></a><h3>
<a name="G-TYPE-FROM-INSTANCE:CAPS"></a>G_TYPE_FROM_INSTANCE()</h3>
<a class="indexterm" name="id2823408"></a><pre class="programlisting">#define G_TYPE_FROM_INSTANCE(instance)                          (G_TYPE_FROM_CLASS (((GTypeInstance*) (instance))-&gt;g_class))
</pre>
<p>
Returns the type identifier from a given <em class="parameter"><code>instance</code></em> structure. 
</p>
<p>
</p>
<p>
This macro should only be used in type implementations.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>instance</code></em>&#160;:</span></p></td>
<td>Location of a valid <a class="link" href="gobject-Type-Information.html#GTypeInstance"><span class="type">GTypeInstance</span></a> structure.


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2823465"></a><h3>
<a name="G-TYPE-FROM-CLASS:CAPS"></a>G_TYPE_FROM_CLASS()</h3>
<a class="indexterm" name="id2823478"></a><pre class="programlisting">#define G_TYPE_FROM_CLASS(g_class)                              (((GTypeClass*) (g_class))-&gt;g_type)
</pre>
<p>
Returns the type identifier from a given <em class="parameter"><code>class</code></em> structure.
</p>
<p>
</p>
<p>
This macro should only be used in type implementations.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>g_class</code></em>&#160;:</span></p></td>
<td>Location of a valid <a class="link" href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure.


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2823533"></a><h3>
<a name="G-TYPE-FROM-INTERFACE:CAPS"></a>G_TYPE_FROM_INTERFACE()</h3>
<a class="indexterm" name="id2823546"></a><pre class="programlisting">#define G_TYPE_FROM_INTERFACE(g_iface)                          (((GTypeInterface*) (g_iface))-&gt;g_type)
</pre>
<p>
Returns the type identifier from a given <em class="parameter"><code>interface</code></em> structure.
</p>
<p>
</p>
<p>
This macro should only be used in type implementations.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>g_iface</code></em>&#160;:</span></p></td>
<td>Location of a valid <a class="link" href="gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> structure.


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2823603"></a><h3>
<a name="G-TYPE-INSTANCE-GET-CLASS:CAPS"></a>G_TYPE_INSTANCE_GET_CLASS()</h3>
<a class="indexterm" name="id2823616"></a><pre class="programlisting">#define G_TYPE_INSTANCE_GET_CLASS(instance, g_type, c_type)     (_G_TYPE_IGC ((instance), (g_type), c_type))
</pre>
<p>
Returns the class structure of a given <em class="parameter"><code>instance</code></em>, casted
to a specified ancestor type <em class="parameter"><code>g_type</code></em> of the instance.
</p>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p>Note
that while calling a <a class="link" href="gobject-Type-Information.html#GInstanceInitFunc"><code class="function">GInstanceInitFunc()</code></a>, the class pointer gets
modified, so it might not always return the expected pointer.
</p>
</div>
<p>
This macro should only be used in type implementations.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>instance</code></em>&#160;:</span></p></td>
<td>	Location of the <a class="link" href="gobject-Type-Information.html#GTypeInstance"><span class="type">GTypeInstance</span></a> structure.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>g_type</code></em>&#160;:</span></p></td>
<td>	The anchestor type of the class to be returned.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>c_type</code></em>&#160;:</span></p></td>
<td>	The corresponding C type of <em class="parameter"><code>g_type</code></em>.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2823728"></a><h3>
<a name="G-TYPE-INSTANCE-GET-INTERFACE:CAPS"></a>G_TYPE_INSTANCE_GET_INTERFACE()</h3>
<a class="indexterm" name="id2823742"></a><pre class="programlisting">#define G_TYPE_INSTANCE_GET_INTERFACE(instance, g_type, c_type) (_G_TYPE_IGI ((instance), (g_type), c_type))
</pre>
<p>
Returns the interface structure for interface <em class="parameter"><code>g_type</code></em> of a given <em class="parameter"><code>instance</code></em>.
</p>
<p>
</p>
<p>
This macro should only be used in type implementations.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>instance</code></em>&#160;:</span></p></td>
<td>Location of the <a class="link" href="gobject-Type-Information.html#GTypeInstance"><span class="type">GTypeInstance</span></a> structure.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>g_type</code></em>&#160;:</span></p></td>
<td>The interface type to be returned.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>c_type</code></em>&#160;:</span></p></td>
<td>The corresponding C type of <em class="parameter"><code>g_type</code></em>.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2823837"></a><h3>
<a name="G-TYPE-INSTANCE-GET-PRIVATE:CAPS"></a>G_TYPE_INSTANCE_GET_PRIVATE()</h3>
<a class="indexterm" name="id2823852"></a><pre class="programlisting">#define G_TYPE_INSTANCE_GET_PRIVATE(instance, g_type, c_type)   ((c_type*) g_type_instance_get_private ((GTypeInstance*) (instance), (g_type)))
</pre>
<p>
Gets the private structure for a particular type.
The private structure must have been registered in the
class_init function with <a class="link" href="gobject-Type-Information.html#g-type-class-add-private"><code class="function">g_type_class_add_private()</code></a>.
</p>
<p>
This macro should only be used in type implementations.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>instance</code></em>&#160;:</span></p></td>
<td>the instance of a type deriving from <em class="parameter"><code>private_type</code></em>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>g_type</code></em>&#160;:</span></p></td>
<td>the type identifying which private data to retrieve.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>c_type</code></em>&#160;:</span></p></td>
<td>The C type for the private structure.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4


</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2823947"></a><h3>
<a name="G-TYPE-CHECK-INSTANCE:CAPS"></a>G_TYPE_CHECK_INSTANCE()</h3>
<a class="indexterm" name="id2823960"></a><pre class="programlisting">#define G_TYPE_CHECK_INSTANCE(instance)				(_G_TYPE_CHI ((GTypeInstance*) (instance)))
</pre>
<p>
Returns <a
href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>instance</code></em> is a valid <a class="link" href="gobject-Type-Information.html#GTypeInstance"><span class="type">GTypeInstance</span></a> structure,
otherwise emits a warning and returns <a
href="./../glib/glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a>.
</p>
<p>
</p>
<p>
This macro should only be used in type implementations.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>instance</code></em>&#160;:</span></p></td>
<td>Location of a <a class="link" href="gobject-Type-Information.html#GTypeInstance"><span class="type">GTypeInstance</span></a> structure.


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2824044"></a><h3>
<a name="G-TYPE-CHECK-INSTANCE-CAST:CAPS"></a>G_TYPE_CHECK_INSTANCE_CAST()</h3>
<a class="indexterm" name="id2824057"></a><pre class="programlisting">#define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type)    (_G_TYPE_CIC ((instance), (g_type), c_type))
</pre>
<p>
Checks that <em class="parameter"><code>instance</code></em> is an instance of the type identified by <em class="parameter"><code>g_type</code></em>
and emits a warning if this is not the case. Returns <em class="parameter"><code>instance</code></em> casted 
to a pointer to <em class="parameter"><code>c_type</code></em>.
</p>
<p>
This macro should only be used in type implementations.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>instance</code></em>&#160;:</span></p></td>
<td>Location of a <a class="link" href="gobject-Type-Information.html#GTypeInstance"><span class="type">GTypeInstance</span></a> structure.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>g_type</code></em>&#160;:</span></p></td>
<td>The type to be returned.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>c_type</code></em>&#160;:</span></p></td>
<td>The corresponding C type of <em class="parameter"><code>g_type</code></em>.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2824165"></a><h3>
<a name="G-TYPE-CHECK-INSTANCE-TYPE:CAPS"></a>G_TYPE_CHECK_INSTANCE_TYPE()</h3>
<a class="indexterm" name="id2824178"></a><pre class="programlisting">#define G_TYPE_CHECK_INSTANCE_TYPE(instance, g_type)            (_G_TYPE_CIT ((instance), (g_type)))
</pre>
<p>
Returns <a
href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>instance</code></em> is an instance of the type identified by <em class="parameter"><code>g_type</code></em>.
Otherwise emits a warning and returns <a
href="./../glib/glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a>.
</p>
<p>
This macro should only be used in type implementations.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>instance</code></em>&#160;:</span></p></td>
<td>Location of a <a class="link" href="gobject-Type-Information.html#GTypeInstance"><span class="type">GTypeInstance</span></a> structure.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>g_type</code></em>&#160;:</span></p></td>
<td>The type to be checked


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2824274"></a><h3>
<a name="G-TYPE-CHECK-CLASS-CAST:CAPS"></a>G_TYPE_CHECK_CLASS_CAST()</h3>
<a class="indexterm" name="id2824287"></a><pre class="programlisting">#define G_TYPE_CHECK_CLASS_CAST(g_class, g_type, c_type)        (_G_TYPE_CCC ((g_class), (g_type), c_type))
</pre>
<p>
Checks that <em class="parameter"><code>g_class</code></em> is a class structure of the type identified by <em class="parameter"><code>g_type</code></em>
and emits a warning if this is not the case. Returns <em class="parameter"><code>g_class</code></em> casted 
to a pointer to <em class="parameter"><code>c_type</code></em>.
</p>
<p>
This macro should only be used in type implementations.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>g_class</code></em>&#160;:</span></p></td>
<td>Location of a <a class="link" href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>g_type</code></em>&#160;:</span></p></td>
<td>The type to be returned.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>c_type</code></em>&#160;:</span></p></td>
<td>The corresponding C type of class structure of <em class="parameter"><code>g_type</code></em>.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2824395"></a><h3>
<a name="G-TYPE-CHECK-CLASS-TYPE:CAPS"></a>G_TYPE_CHECK_CLASS_TYPE()</h3>
<a class="indexterm" name="id2824409"></a><pre class="programlisting">#define G_TYPE_CHECK_CLASS_TYPE(g_class, g_type)                (_G_TYPE_CCT ((g_class), (g_type)))
</pre>
<p>
Returns <a
href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>g_class</code></em> is a class structure of the type identified by 
<em class="parameter"><code>g_type</code></em>. Otherwise emits a warning and returns <a
href="./../glib/glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a>.
</p>
<p>
This macro should only be used in type implementations.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>g_class</code></em>&#160;:</span></p></td>
<td>Location of a <a class="link" href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>g_type</code></em>&#160;:</span></p></td>
<td>The type to be checked.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2824504"></a><h3>
<a name="G-TYPE-CHECK-VALUE:CAPS"></a>G_TYPE_CHECK_VALUE()</h3>
<a class="indexterm" name="id2824516"></a><pre class="programlisting">#define G_TYPE_CHECK_VALUE(value)				(_G_TYPE_CHV ((value)))
</pre>
<p>
Returns <a
href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>value</code></em> has been initialized to hold values
of a value type.
</p>
<p>
This macro should only be used in type implementations.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="gobject-Generic-values.html#GValue"><span class="type">GValue</span></a>


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2824580"></a><h3>
<a name="G-TYPE-CHECK-VALUE-TYPE:CAPS"></a>G_TYPE_CHECK_VALUE_TYPE()</h3>
<a class="indexterm" name="id2824593"></a><pre class="programlisting">#define G_TYPE_CHECK_VALUE_TYPE(value, g_type)			(_G_TYPE_CVH ((value), (g_type)))
</pre>
<p>
Returns <a
href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>value</code></em> has been initialized to hold values
of type <em class="parameter"><code>g_type</code></em>. 
</p>
<p>
This macro should only be used in type implementations.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="gobject-Generic-values.html#GValue"><span class="type">GValue</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>g_type</code></em>&#160;:</span></p></td>
<td>The type to be checked.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2824676"></a><h3>
<a name="G-TYPE-FLAG-RESERVED-ID-BIT:CAPS"></a>G_TYPE_FLAG_RESERVED_ID_BIT</h3>
<a class="indexterm" name="id2824689"></a><pre class="programlisting">#define	G_TYPE_FLAG_RESERVED_ID_BIT	((GType) (1 &lt;&lt; 0))
</pre>
<p>
A bit in the type number that's supposed to be left untouched.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2824706"></a><h3>
<a name="g-type-init"></a>g_type_init ()</h3>
<a class="indexterm" name="id2824719"></a><pre class="programlisting">void                g_type_init                         (void);</pre>
<p>
Prior to any use of the type system, <a class="link" href="gobject-Type-Information.html#g-type-init"><code class="function">g_type_init()</code></a> has to be called to initialize
the type system and assorted other code portions (such as the various fundamental
type implementations or the signal system).
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2824754"></a><h3>
<a name="GTypeDebugFlags"></a>enum GTypeDebugFlags</h3>
<a class="indexterm" name="id2824767"></a><pre class="programlisting">typedef enum	/*&lt; skip &gt;*/
{
  G_TYPE_DEBUG_NONE	= 0,
  G_TYPE_DEBUG_OBJECTS	= 1 &lt;&lt; 0,
  G_TYPE_DEBUG_SIGNALS	= 1 &lt;&lt; 1,
  G_TYPE_DEBUG_MASK	= 0x03
} GTypeDebugFlags;
</pre>
<p>
The <span class="type">GTypeDebugFlags</span> enumeration values can be passed to
<a class="link" href="gobject-Type-Information.html#g-type-init-with-debug-flags"><code class="function">g_type_init_with_debug_flags()</code></a> to trigger debugging messages during runtime.
Note that the messages can also be triggered by setting the
<code class="envar">GOBJECT_DEBUG</code> environment variable to a ':'-separated list of 
"objects" and "signals".

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a name="G-TYPE-DEBUG-NONE:CAPS"></a><code class="literal">G_TYPE_DEBUG_NONE</code></span></p></td>
<td>Print no messages.
</td>
</tr>
<tr>
<td><p><span class="term"><a name="G-TYPE-DEBUG-OBJECTS:CAPS"></a><code class="literal">G_TYPE_DEBUG_OBJECTS</code></span></p></td>
<td>Print messages about object bookkeeping.
</td>
</tr>
<tr>
<td><p><span class="term"><a name="G-TYPE-DEBUG-SIGNALS:CAPS"></a><code class="literal">G_TYPE_DEBUG_SIGNALS</code></span></p></td>
<td>Print messages about signal emissions.
</td>
</tr>
<tr>
<td><p><span class="term"><a name="G-TYPE-DEBUG-MASK:CAPS"></a><code class="literal">G_TYPE_DEBUG_MASK</code></span></p></td>
<td>Mask covering all debug flags.

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2824902"></a><h3>
<a name="g-type-init-with-debug-flags"></a>g_type_init_with_debug_flags ()</h3>
<a class="indexterm" name="id2824914"></a><pre class="programlisting">void                g_type_init_with_debug_flags        (<a class="link" href="gobject-Type-Information.html#GTypeDebugFlags">GTypeDebugFlags</a> debug_flags);</pre>
<p>
Similar to <a class="link" href="gobject-Type-Information.html#g-type-init"><code class="function">g_type_init()</code></a>, but additionally sets debug flags.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>debug_flags</code></em>&#160;:</span></p></td>
<td>Bitwise combination of <a class="link" href="gobject-Type-Information.html#GTypeDebugFlags"><span class="type">GTypeDebugFlags</span></a> values for debugging purposes.


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2824982"></a><h3>
<a name="g-type-name"></a>g_type_name ()</h3>
<a class="indexterm" name="id2824994"></a><pre class="programlisting">const <a
href="./../glib/glib/glib-Basic-Types.html#gchar"
>gchar</a>*        g_type_name                         (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type);</pre>
<p>
    Returns the unique name that is assigned to a type ID.
    Note that this function (like all other GType API) cannot cope with invalid
    type IDs. <a class="link" href="gobject-Type-Information.html#G-TYPE-INVALID:CAPS"><code class="literal">G_TYPE_INVALID</code></a> may be passed to this function, as may be any other
    validly registered type ID, but randomized type IDs should not be passed in and
    will most likely lead to a crash.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></p></td>
<td>		Type to return name for.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>	Static type name or <a
href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2825079"></a><h3>
<a name="g-type-qname"></a>g_type_qname ()</h3>
<a class="indexterm" name="id2825092"></a><pre class="programlisting"><a
href="./../glib/glib/glib-Quarks.html#GQuark"
>GQuark</a>              g_type_qname                        (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type);</pre>
<p>
Return the corresponding quark of the type IDs name.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></p></td>
<td>   Type to return quark of type name for.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>The type names quark or 0.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2825150"></a><h3>
<a name="g-type-from-name"></a>g_type_from_name ()</h3>
<a class="indexterm" name="id2825163"></a><pre class="programlisting"><a class="link" href="gobject-Type-Information.html#GType">GType</a>               g_type_from_name                    (const <a
href="./../glib/glib/glib-Basic-Types.html#gchar"
>gchar</a> *name);</pre>
<p>
Lookup the type ID from a given type name, returning 0 if no type has been registered under this name
(this is the preferred method to find out by name whether a specific type has been registered yet).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em>&#160;:</span></p></td>
<td>   Type name to lookup.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>Corresponding type ID or 0.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2825224"></a><h3>
<a name="g-type-parent"></a>g_type_parent ()</h3>
<a class="indexterm" name="id2825236"></a><pre class="programlisting"><a class="link" href="gobject-Type-Information.html#GType">GType</a>               g_type_parent                       (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type);</pre>
<p>
Return the direct parent type of the passed in type.
If the passed in type has no parent, i.e. is a fundamental type, 0 is returned.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></p></td>
<td>   The derived type.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>The parent type.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2825296"></a><h3>
<a name="g-type-depth"></a>g_type_depth ()</h3>
<a class="indexterm" name="id2825309"></a><pre class="programlisting"><a
href="./../glib/glib/glib-Basic-Types.html#guint"
>guint</a>               g_type_depth                        (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type);</pre>
<p>
Returns the length of the ancestry of the passed in type. This includes the
type itself, so that e.g. a fundamental type has depth 1.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></p></td>
<td>   A <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>The depth of <em class="parameter"><code>type</code></em>.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2825382"></a><h3>
<a name="g-type-next-base"></a>g_type_next_base ()</h3>
<a class="indexterm" name="id2825394"></a><pre class="programlisting"><a class="link" href="gobject-Type-Information.html#GType">GType</a>               g_type_next_base                    (<a class="link" href="gobject-Type-Information.html#GType">GType</a> leaf_type,
                                                         <a class="link" href="gobject-Type-Information.html#GType">GType</a> root_type);</pre>
<p>
Given a <em class="parameter"><code>leaf_type</code></em> and a <em class="parameter"><code>root_type</code></em> which is contained in its anchestry, return
the type that <em class="parameter"><code>root_type</code></em> is the immediate parent of.
In other words, this function determines the type that is derived directly from
<em class="parameter"><code>root_type</code></em> which is also a base class of <em class="parameter"><code>leaf_type</code></em>.  Given a root type and a
leaf type, this function can be used to determine the types and order in which
the leaf type is descended from the root type.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>leaf_type</code></em>&#160;:</span></p></td>
<td>	Descendant of <em class="parameter"><code>root_type</code></em> and the type to be returned.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>root_type</code></em>&#160;:</span></p></td>
<td>	Immediate parent of the returned type.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>	Immediate child of <em class="parameter"><code>root_type</code></em> and anchestor of <em class="parameter"><code>leaf_type</code></em>.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2825528"></a><h3>
<a name="g-type-is-a"></a>g_type_is_a ()</h3>
<a class="indexterm" name="id2825540"></a><pre class="programlisting"><a
href="./../glib/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>            g_type_is_a                         (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type,
                                                         <a class="link" href="gobject-Type-Information.html#GType">GType</a> is_a_type);</pre>
<p>
If <em class="parameter"><code>is_a_type</code></em> is a derivable type, check whether <em class="parameter"><code>type</code></em> is a descendant of <em class="parameter"><code>is_a_type</code></em>.
If <em class="parameter"><code>is_a_type</code></em> is an interface, check whether <em class="parameter"><code>type</code></em> conforms to it.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></p></td>
<td>     Type to check anchestry for.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>is_a_type</code></em>&#160;:</span></p></td>
<td>Possible anchestor of <em class="parameter"><code>type</code></em> or interface <em class="parameter"><code>type</code></em> could conform to.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>  <a
href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>type</code></em> is_a <em class="parameter"><code>is_a_type</code></em> holds true.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2825686"></a><h3>
<a name="g-type-class-ref"></a>g_type_class_ref ()</h3>
<a class="indexterm" name="id2825698"></a><pre class="programlisting"><a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>            g_type_class_ref                    (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type);</pre>
<p>
Increments the reference count of the class structure belonging to
<em class="parameter"><code>type</code></em>. This function will demand-create the class if it doesn't
exist already.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></p></td>
<td>	  Type ID of a classed type.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>The <a class="link" href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure for the given type ID.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2825772"></a><h3>
<a name="g-type-class-peek"></a>g_type_class_peek ()</h3>
<a class="indexterm" name="id2825785"></a><pre class="programlisting"><a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>            g_type_class_peek                   (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type);</pre>
<p>
This function is essentially the same as <a class="link" href="gobject-Type-Information.html#g-type-class-ref"><code class="function">g_type_class_ref()</code></a>, except that
the classes reference count isn't incremented. As a consequence, this function
may return <a
href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if the class of the type passed in does not currently
exist (hasn't been referenced before).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></p></td>
<td>		Type ID of a classed type.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>	The <a class="link" href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure for the given type ID or <a
href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
		if the class does not currently exist.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2825886"></a><h3>
<a name="g-type-class-peek-static"></a>g_type_class_peek_static ()</h3>
<a class="indexterm" name="id2825901"></a><pre class="programlisting"><a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>            g_type_class_peek_static            (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type);</pre>
<p>
A more efficient version of <a class="link" href="gobject-Type-Information.html#g-type-class-peek"><code class="function">g_type_class_peek()</code></a> which works only for
static types.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></p></td>
<td>Type ID of a classed type.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>The <a class="link" href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure for the given type ID or <a
href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
   if the class does not currently exist or is dynamically loaded.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4


</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2825997"></a><h3>
<a name="g-type-class-unref"></a>g_type_class_unref ()</h3>
<a class="indexterm" name="id2826010"></a><pre class="programlisting">void                g_type_class_unref                  (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class);</pre>
<p>
Decrements the reference count of the class structure being passed in.
Once the last reference count of a class has been released, classes
may be finalized by the type system, so further dereferencing of a
class pointer after <a class="link" href="gobject-Type-Information.html#g-type-class-unref"><code class="function">g_type_class_unref()</code></a> are invalid.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>g_class</code></em>&#160;:</span></p></td>
<td>	The <a class="link" href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure to unreference.


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2826079"></a><h3>
<a name="g-type-class-peek-parent"></a>g_type_class_peek_parent ()</h3>
<a class="indexterm" name="id2826092"></a><pre class="programlisting"><a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>            g_type_class_peek_parent            (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class);</pre>
<p>
This is a convenience function often needed in class initializers.
It returns the class structure of the immediate parent type of the class passed in.
Since derived classes hold
a reference count on their parent classes as long as they are instantiated,
the returned class will always exist. This function is essentially
equivalent to:

</p>
<pre class="programlisting">
g_type_class_peek (g_type_parent (G_TYPE_FROM_CLASS (g_class)));
</pre>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>g_class</code></em>&#160;:</span></p></td>
<td>The <a class="link" href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure to retrieve the parent class for.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>The parent class of <em class="parameter"><code>g_class</code></em>.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2826176"></a><h3>
<a name="g-type-class-add-private"></a>g_type_class_add_private ()</h3>
<a class="indexterm" name="id2826191"></a><pre class="programlisting">void                g_type_class_add_private            (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class,
                                                         <a
href="./../glib/glib/glib-Basic-Types.html#gsize"
>gsize</a> private_size);</pre>
<p>
Registers a private structure for a instantiatable type;
when an object is allocated, the private structures for
the type and and all of its parent types are allocated
sequentially in the same memory block as the public
structures. This function should be called in the
type's <a class="link" href="gtype-instantiable-classed.html#class-init"><code class="function">class_init()</code></a> function. The private structure can
be retrieved using the <a class="link" href="gobject-Type-Information.html#G-TYPE-INSTANCE-GET-PRIVATE:CAPS"><code class="function">G_TYPE_INSTANCE_GET_PRIVATE()</code></a> macro.
The following example shows attaching a private structure
<span class="structname">MyObjectPrivate</span> to an object
<span class="structname">MyObject</span> defined in the standard GObject
fashion.
</p>
<pre class="programlisting">
typedef struct _MyObjectPrivate MyObjectPrivate;

struct _MyObjectPrivate {
  int some_field;
};

#define MY_OBJECT_GET_PRIVATE(o)  \
   (G_TYPE_INSTANCE_GET_PRIVATE ((o), MY_TYPE_OBJECT, MyObjectPrivate))

static void
my_object_class_init (MyObjectClass *klass)
{
  g_type_class_add_private (klass, sizeof (MyObjectPrivate));
}

static int
my_object_get_some_field (MyObject *my_object)
{
  MyObjectPrivate *priv = MY_OBJECT_GET_PRIVATE (my_object);

  return priv-&gt;some_field;
}
</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>g_class</code></em>&#160;:</span></p></td>
<td>class structure for an instantiatable type
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>private_size</code></em>&#160;:</span></p></td>
<td>size of private structure.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4


</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2826323"></a><h3>
<a name="g-type-interface-peek"></a>g_type_interface_peek ()</h3>
<a class="indexterm" name="id2826336"></a><pre class="programlisting"><a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>            g_type_interface_peek               (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> instance_class,
                                                         <a class="link" href="gobject-Type-Information.html#GType">GType</a> iface_type);</pre>
<p>
Returns the <a class="link" href="gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> structure of an interface to which the passed in 
class conforms.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>instance_class</code></em>&#160;:</span></p></td>
<td>A <a class="link" href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>iface_type</code></em>&#160;:</span></p></td>
<td>    An interface ID which this class conforms to.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>       The GTypeInterface structure of iface_type if implemented 
                 by <em class="parameter"><code>instance_class</code></em>, <a
href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> otherwise


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2826451"></a><h3>
<a name="g-type-interface-peek-parent"></a>g_type_interface_peek_parent ()</h3>
<a class="indexterm" name="id2826464"></a><pre class="programlisting"><a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>            g_type_interface_peek_parent        (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_iface);</pre>
<p>
Returns the corresponding <a class="link" href="gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> structure of the parent type
of the instance type to which <em class="parameter"><code>g_iface</code></em> belongs. This is useful when 
deriving the implementation of an interface from the parent type and 
then possibly overriding some methods. 
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>g_iface</code></em>&#160;:</span></p></td>
<td>A <a class="link" href="gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> structure.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>The corresponding <a class="link" href="gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> structure of the parent type
   of the instance type to which <em class="parameter"><code>g_iface</code></em> belongs, or <a
href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if the parent type
   doesn't conform to the interface.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2826572"></a><h3>
<a name="g-type-default-interface-ref"></a>g_type_default_interface_ref ()</h3>
<a class="indexterm" name="id2826588"></a><pre class="programlisting"><a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>            g_type_default_interface_ref        (<a class="link" href="gobject-Type-Information.html#GType">GType</a> g_type);</pre>
<p>
Increments the reference count for the interface type <em class="parameter"><code>g_type</code></em>,
and returns the default interface vtable for the type.
</p>
<p>  
If the type is not currently in use, then the default vtable
for the type will be created and initalized by calling
the base interface init and default vtable init functions for
the type (the @<em class="structfield"><code>base_init</code></em>
and <em class="structfield"><code>class_init</code></em> members of <a class="link" href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a>).
Calling <a class="link" href="gobject-Type-Information.html#g-type-default-interface-ref"><code class="function">g_type_default_interface_ref()</code></a> is useful when you
want to make sure that signals and properties for an interface
have been installed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>g_type</code></em>&#160;:</span></p></td>
<td>an interface type
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>the default vtable for the interface; call 
 <a class="link" href="gobject-Type-Information.html#g-type-default-interface-unref"><code class="function">g_type_default_interface_unref()</code></a> when you are done using
 the interface.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4


</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2826706"></a><h3>
<a name="g-type-default-interface-peek"></a>g_type_default_interface_peek ()</h3>
<a class="indexterm" name="id2826722"></a><pre class="programlisting"><a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>            g_type_default_interface_peek       (<a class="link" href="gobject-Type-Information.html#GType">GType</a> g_type);</pre>
<p>
If the interface type <em class="parameter"><code>g_type</code></em> is currently in use, returns
its default interface vtable.    
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>g_type</code></em>&#160;:</span></p></td>
<td>an interface type
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>the default vtable for the interface, or <a
href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
 if the type is not currently in use.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4


</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2826804"></a><h3>
<a name="g-type-default-interface-unref"></a>g_type_default_interface_unref ()</h3>
<a class="indexterm" name="id2826819"></a><pre class="programlisting">void                g_type_default_interface_unref      (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_iface);</pre>
<p>
Decrements the reference count for the type corresponding to the
interface default vtable <em class="parameter"><code>g_iface</code></em>. If the type is dynamic, then
when no one is using the interface and all references have
been released, the finalize function for the interface's default
vtable (the <em class="structfield"><code>class_finalize</code></em> member of
<a class="link" href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a>) will be called.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>g_iface</code></em>&#160;:</span></p></td>
<td>the default vtable structure for a interface, as
  returned by <a class="link" href="gobject-Type-Information.html#g-type-default-interface-ref"><code class="function">g_type_default_interface_ref()</code></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.4


</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2826907"></a><h3>
<a name="g-type-children"></a>g_type_children ()</h3>
<a class="indexterm" name="id2826920"></a><pre class="programlisting"><a class="link" href="gobject-Type-Information.html#GType">GType</a>*              g_type_children                     (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type,
                                                         <a
href="./../glib/glib/glib-Basic-Types.html#guint"
>guint</a> *n_children);</pre>
<p>
Return a newly allocated and 0-terminated array of type IDs, listing the
child types of <em class="parameter"><code>type</code></em>. The return value has to be <a
href="./../glib/glib/glib-Memory-Allocation.html#g-free"
><code class="function">g_free()</code></a>ed after use.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></p></td>
<td>      The parent type.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_children</code></em>&#160;:</span></p></td>
<td>Optional <a
href="./../glib/glib/glib-Basic-Types.html#guint"
><span class="type">guint</span></a> pointer to contain the number of child types.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>   Newly allocated and 0-terminated array of child types.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2827028"></a><h3>
<a name="g-type-interfaces"></a>g_type_interfaces ()</h3>
<a class="indexterm" name="id2827041"></a><pre class="programlisting"><a class="link" href="gobject-Type-Information.html#GType">GType</a>*              g_type_interfaces                   (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type,
                                                         <a
href="./../glib/glib/glib-Basic-Types.html#guint"
>guint</a> *n_interfaces);</pre>
<p>
Return a newly allocated and 0-terminated array of type IDs, listing the
interface types that <em class="parameter"><code>type</code></em> conforms to. The return value has to be
<a
href="./../glib/glib/glib-Memory-Allocation.html#g-free"
><code class="function">g_free()</code></a>ed after use.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></p></td>
<td>        The type to list interface types for.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_interfaces</code></em>&#160;:</span></p></td>
<td>Optional <a
href="./../glib/glib/glib-Basic-Types.html#guint"
><span class="type">guint</span></a> pointer to contain the number of interface types.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>     Newly allocated and 0-terminated array of interface types.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2827148"></a><h3>
<a name="g-type-interface-prerequisites"></a>g_type_interface_prerequisites ()</h3>
<a class="indexterm" name="id2827164"></a><pre class="programlisting"><a class="link" href="gobject-Type-Information.html#GType">GType</a>*              g_type_interface_prerequisites      (<a class="link" href="gobject-Type-Information.html#GType">GType</a> interface_type,
                                                         <a
href="./../glib/glib/glib-Basic-Types.html#guint"
>guint</a> *n_prerequisites);</pre>
<p>
Returns the prerequisites of an interfaces type.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>interface_type</code></em>&#160;:</span></p></td>
<td>an interface type
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_prerequisites</code></em>&#160;:</span></p></td>
<td>location to return the number of prerequisites, or <a
href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>a newly-allocated zero-terminated array of <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> containing 
   the prerequisites of <em class="parameter"><code>interface_type</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2


</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2827277"></a><h3>
<a name="g-type-set-qdata"></a>g_type_set_qdata ()</h3>
<a class="indexterm" name="id2827290"></a><pre class="programlisting">void                g_type_set_qdata                    (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type,
                                                         <a
href="./../glib/glib/glib-Quarks.html#GQuark"
>GQuark</a> quark,
                                                         <a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data);</pre>
<p>
Attaches arbitrary data to a type.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>quark</code></em>&#160;:</span></p></td>
<td>a <a
href="./../glib/glib/glib-Quarks.html#GQuark"
><span class="type">GQuark</span></a> id to identify the data
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
<td>the data


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2827395"></a><h3>
<a name="g-type-get-qdata"></a>g_type_get_qdata ()</h3>
<a class="indexterm" name="id2827408"></a><pre class="programlisting"><a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>            g_type_get_qdata                    (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type,
                                                         <a
href="./../glib/glib/glib-Quarks.html#GQuark"
>GQuark</a> quark);</pre>
<p>
Obtains data which has previously been attached to <em class="parameter"><code>type</code></em>
with <a class="link" href="gobject-Type-Information.html#g-type-set-qdata"><code class="function">g_type_set_qdata()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>quark</code></em>&#160;:</span></p></td>
<td>a <a
href="./../glib/glib/glib-Quarks.html#GQuark"
><span class="type">GQuark</span></a> id to identify the data
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>the data, or <a
href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if no data was found


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2827530"></a><h3>
<a name="g-type-query"></a>g_type_query ()</h3>
<a class="indexterm" name="id2827543"></a><pre class="programlisting">void                g_type_query                        (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type,
                                                         <a class="link" href="gobject-Type-Information.html#GTypeQuery">GTypeQuery</a> *query);</pre>
<p>
Queries the type system for information about a specific type. 
This function will fill in a user-provided structure to hold type-specific 
information. If an invalid <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> is passed in, the <em class="parameter"><code>type</code></em> member of the 
<a class="link" href="gobject-Type-Information.html#GTypeQuery"><span class="type">GTypeQuery</span></a> is 0. All members filled into the <a class="link" href="gobject-Type-Information.html#GTypeQuery"><span class="type">GTypeQuery</span></a> structure should
be considered constant and have to be left untouched.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></p></td>
<td>the <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value of a static, classed type.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>query</code></em>&#160;:</span></p></td>
<td>A user provided structure that is filled in with constant values 
        upon success.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2827656"></a><h3>
<a name="GTypeQuery"></a>GTypeQuery</h3>
<a class="indexterm" name="id2827668"></a><pre class="programlisting">typedef struct {
  GType		type;
  const gchar  *type_name;
  guint		class_size;
  guint		instance_size;
} GTypeQuery;
</pre>
<p>
A structure holding information for a specific type. It is
filled in by the <a class="link" href="gobject-Type-Information.html#g-type-query"><code class="function">g_type_query()</code></a> function.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a class="link" href="gobject-Type-Information.html#GType">GType</a>&#160;<em class="structfield"><code>type</code></em>;</span></p></td>
<td>the <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value of the type.
</td>
</tr>
<tr>
<td><p><span class="term">const&#160;<a
href="./../glib/glib/glib-Basic-Types.html#gchar"
>gchar</a>&#160;*<em class="structfield"><code>type_name</code></em>;</span></p></td>
<td>the name of the type.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="./../glib/glib/glib-Basic-Types.html#guint"
>guint</a>&#160;<em class="structfield"><code>class_size</code></em>;</span></p></td>
<td>the size of the class structure.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="./../glib/glib/glib-Basic-Types.html#guint"
>guint</a>&#160;<em class="structfield"><code>instance_size</code></em>;</span></p></td>
<td>the size of the instance structure.

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2827793"></a><h3>
<a name="GBaseInitFunc"></a>GBaseInitFunc ()</h3>
<a class="indexterm" name="id2827805"></a><pre class="programlisting">void                (*GBaseInitFunc)                    (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class);</pre>
<p>
A callback function used by the type system to do base initialization
of the class structures of derived types. It is called as part of the
initialization process of all derived classes and should reallocate
or reset all dynamic class members copied over from the parent class.
For example, class members (such as strings) that are not sufficiently
handled by a plain memory copy of the parent class into the derived class
have to be altered. See <a class="link" href="gobject-Type-Information.html#GClassInitFunc"><code class="function">GClassInitFunc()</code></a> for a discussion of the class
intialization process.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>g_class</code></em>&#160;:</span></p></td>
<td>The <a class="link" href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure to initialize.


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2827879"></a><h3>
<a name="GBaseFinalizeFunc"></a>GBaseFinalizeFunc ()</h3>
<a class="indexterm" name="id2827892"></a><pre class="programlisting">void                (*GBaseFinalizeFunc)                (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class);</pre>
<p>
A callback function used by the type system to finalize those portions
of a derived types class structure that were setup from the corresponding
<a class="link" href="gobject-Type-Information.html#GBaseInitFunc"><code class="function">GBaseInitFunc()</code></a> function. Class finalization basically works the inverse
way in which class intialization is performed.
See <a class="link" href="gobject-Type-Information.html#GClassInitFunc"><code class="function">GClassInitFunc()</code></a> for a discussion of the class intialization process.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>g_class</code></em>&#160;:</span></p></td>
<td>The <a class="link" href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure to finalize.


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2827973"></a><h3>
<a name="GClassInitFunc"></a>GClassInitFunc ()</h3>
<a class="indexterm" name="id2827985"></a><pre class="programlisting">void                (*GClassInitFunc)                   (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class,
                                                         <a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> class_data);</pre>
<p>
A callback function used by the type system to initialize the class
of a specific type. This function should initialize all static class
members.
The initialization process of a class involves:
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"></span></p></td>
<td><p>
	1 - Copying common members from the parent class over to the
	derived class structure.
  </p></td>
</tr>
<tr>
<td><p><span class="term"></span></p></td>
<td><p>
	2 -  Zero initialization of the remaining members not copied
	over from the parent class.
  </p></td>
</tr>
<tr>
<td><p><span class="term"></span></p></td>
<td><p>
	3 - Invocation of the <a class="link" href="gobject-Type-Information.html#GBaseInitFunc"><code class="function">GBaseInitFunc()</code></a> initializers of all parent
	types and the class' type.
  </p></td>
</tr>
<tr>
<td><p><span class="term"></span></p></td>
<td><p>
	4 - Invocation of the class' <a class="link" href="gobject-Type-Information.html#GClassInitFunc"><code class="function">GClassInitFunc()</code></a> initializer.
  </p></td>
</tr>
</tbody>
</table></div>
<p>
Since derived classes are partially initialized through a memory copy
of the parent class, the general rule is that <a class="link" href="gobject-Type-Information.html#GBaseInitFunc"><code class="function">GBaseInitFunc()</code></a> and
<a class="link" href="gobject-Type-Information.html#GBaseFinalizeFunc"><code class="function">GBaseFinalizeFunc()</code></a> should take care of necessary reinitialization
and release of those class members that were introduced by the type
that specified these <a class="link" href="gobject-Type-Information.html#GBaseInitFunc"><code class="function">GBaseInitFunc()</code></a>/<a class="link" href="gobject-Type-Information.html#GBaseFinalizeFunc"><code class="function">GBaseFinalizeFunc()</code></a>.
<a class="link" href="gobject-Type-Information.html#GClassInitFunc"><code class="function">GClassInitFunc()</code></a> should only care about initializing static
class members, while dynamic class members (such as allocated strings
or reference counted resources) are better handled by a <a class="link" href="gobject-Type-Information.html#GBaseInitFunc"><code class="function">GBaseInitFunc()</code></a>
for this type, so proper initialization of the dynamic class members
is performed for class initialization of derived types as well.
An example may help to correspond the intend of the different class
initializers:

</p>
<pre class="programlisting">
typedef struct {
  GObjectClass parent_class;
  gint         static_integer;
  gchar       *dynamic_string;
} TypeAClass;
static void
type_a_base_class_init (TypeAClass *class)
{
  class-&gt;dynamic_string = g_strdup ("some string");
}
static void
type_a_base_class_finalize (TypeAClass *class)
{
  g_free (class-&gt;dynamic_string);
}
static void
type_a_class_init (TypeAClass *class)
{
  class-&gt;static_integer = 42;
}

typedef struct {
  TypeAClass   parent_class;
  gfloat       static_float;
  GString     *dynamic_gstring;
} TypeBClass;
static void
type_b_base_class_init (TypeBClass *class)
{
  class-&gt;dynamic_gstring = g_string_new ("some other string");
}
static void
type_b_base_class_finalize (TypeBClass *class)
{
  g_string_free (class-&gt;dynamic_gstring);
}
static void
type_b_class_init (TypeBClass *class)
{
  class-&gt;static_float = 3.14159265358979323846;
}
</pre>
<p>
Initialization of TypeBClass will first cause initialization of
TypeAClass (derived classes reference their parent classes, see
<a class="link" href="gobject-Type-Information.html#g-type-class-ref"><code class="function">g_type_class_ref()</code></a> on this).
Initialization of TypeAClass roughly involves zero-initializing its fields,
then calling its <a class="link" href="gobject-Type-Information.html#GBaseInitFunc"><code class="function">GBaseInitFunc()</code></a> <code class="function">type_a_base_class_init()</code> to allocate
its dynamic members (dynamic_string), and finally calling its <a class="link" href="gobject-Type-Information.html#GClassInitFunc"><code class="function">GClassInitFunc()</code></a>
<code class="function">type_a_class_init()</code> to initialize its static members (static_integer).
The first step in the initialization process of TypeBClass is then
a plain memory copy of the contents of TypeAClass into TypeBClass and 
zero-initialization of the remaining fields in TypeBClass.
The dynamic members of TypeAClass within TypeBClass now need
reinitialization which is performed by calling <code class="function">type_a_base_class_init()</code>
with an argument of TypeBClass.
After that, the <a class="link" href="gobject-Type-Information.html#GBaseInitFunc"><code class="function">GBaseInitFunc()</code></a> of TypeBClass, <code class="function">type_b_base_class_init()</code>
is called to allocate the dynamic members of TypeBClass (dynamic_gstring),
and finally the <a class="link" href="gobject-Type-Information.html#GClassInitFunc"><code class="function">GClassInitFunc()</code></a> of TypeBClass, <code class="function">type_b_class_init()</code>,
is called to complete the initialization process with the static members
(static_float).
Corresponding finalization counter parts to the <a class="link" href="gobject-Type-Information.html#GBaseInitFunc"><code class="function">GBaseInitFunc()</code></a> functions
have to be provided to release allocated resources at class finalization
time.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>g_class</code></em>&#160;:</span></p></td>
<td>	The <a class="link" href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure to initialize.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>class_data</code></em>&#160;:</span></p></td>
<td>	The <em class="parameter"><code>class_data</code></em> member supplied via the <a class="link" href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> structure.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2828368"></a><h3>
<a name="GClassFinalizeFunc"></a>GClassFinalizeFunc ()</h3>
<a class="indexterm" name="id2828381"></a><pre class="programlisting">void                (*GClassFinalizeFunc)               (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class,
                                                         <a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> class_data);</pre>
<p>
A callback function used by the type system to finalize a class.
This function is rarely needed, as dynamically allocated class resources
should be handled by <a class="link" href="gobject-Type-Information.html#GBaseInitFunc"><code class="function">GBaseInitFunc()</code></a> and <a class="link" href="gobject-Type-Information.html#GBaseFinalizeFunc"><code class="function">GBaseFinalizeFunc()</code></a>.
Also, specification of a <a class="link" href="gobject-Type-Information.html#GClassFinalizeFunc"><code class="function">GClassFinalizeFunc()</code></a> in the <a class="link" href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a>
structure of a static type is invalid, because classes of static types
will never be finalized (they are artificially kept alive when their
reference count drops to zero).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>g_class</code></em>&#160;:</span></p></td>
<td>	The <a class="link" href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure to finalize.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>class_data</code></em>&#160;:</span></p></td>
<td>	The <em class="parameter"><code>class_data</code></em> member supplied via the <a class="link" href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> structure.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2828518"></a><h3>
<a name="GInstanceInitFunc"></a>GInstanceInitFunc ()</h3>
<a class="indexterm" name="id2828530"></a><pre class="programlisting">void                (*GInstanceInitFunc)                (<a class="link" href="gobject-Type-Information.html#GTypeInstance">GTypeInstance</a> *instance,
                                                         <a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class);</pre>
<p>
A callback function used by the type system to initialize a new
instance of a type. This function initializes all instance members and
allocates any resources required by it.
Initialization of a derived instance involves calling all its parent
types instance initializers, so the class member of the instance
is altered during its initialization to always point to the class that
belongs to the type the current initializer was introduced for.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>instance</code></em>&#160;:</span></p></td>
<td>	The instance to initialize.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>g_class</code></em>&#160;:</span></p></td>
<td>	The class of the type the instance is created for.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2828607"></a><h3>
<a name="GInterfaceInitFunc"></a>GInterfaceInitFunc ()</h3>
<a class="indexterm" name="id2828620"></a><pre class="programlisting">void                (*GInterfaceInitFunc)               (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_iface,
                                                         <a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> iface_data);</pre>
<p>
A callback function used by the type system to initialize a new
interface.  This function should initialize all internal data and
allocate any resources required by the interface.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>g_iface</code></em>&#160;:</span></p></td>
<td>	The interface structure to initialize.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>iface_data</code></em>&#160;:</span></p></td>
<td>	The <em class="parameter"><code>class_data</code></em> supplied via the <a class="link" href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> structure.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2828706"></a><h3>
<a name="GInterfaceFinalizeFunc"></a>GInterfaceFinalizeFunc ()</h3>
<a class="indexterm" name="id2828719"></a><pre class="programlisting">void                (*GInterfaceFinalizeFunc)           (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_iface,
                                                         <a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> iface_data);</pre>
<p>
A callback function used by the type system to finalize an interface.
This function should destroy any internal data and release any resources
allocated by the corresponding <a class="link" href="gobject-Type-Information.html#GInterfaceInitFunc"><code class="function">GInterfaceInitFunc()</code></a> function.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>g_iface</code></em>&#160;:</span></p></td>
<td>	The interface structure to finalize.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>iface_data</code></em>&#160;:</span></p></td>
<td>	The <em class="parameter"><code>class_data</code></em> supplied via the <a class="link" href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> structure.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2828816"></a><h3>
<a name="GTypeClassCacheFunc"></a>GTypeClassCacheFunc ()</h3>
<a class="indexterm" name="id2828829"></a><pre class="programlisting"><a
href="./../glib/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>            (*GTypeClassCacheFunc)              (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> cache_data,
                                                         <a class="link" href="gobject-Type-Information.html#GTypeClass">GTypeClass</a> *g_class);</pre>
<p>
A callback function which is called when the reference count of a class 
drops to zero. It may use <a class="link" href="gobject-Type-Information.html#g-type-class-ref"><code class="function">g_type_class_ref()</code></a> to prevent the class from
being freed. You should not call <a class="link" href="gobject-Type-Information.html#g-type-class-unref"><code class="function">g_type_class_unref()</code></a> from a 
<a class="link" href="gobject-Type-Information.html#GTypeClassCacheFunc"><span class="type">GTypeClassCacheFunc</span></a> function to prevent infinite recursion, use 
<a class="link" href="gobject-Type-Information.html#g-type-class-unref-uncached"><code class="function">g_type_class_unref_uncached()</code></a> instead.
</p>
<p>
The functions have to check the class id passed in to figure 
whether they actually want to cache the class of this type, since all
classes are routed through the same <a class="link" href="gobject-Type-Information.html#GTypeClassCacheFunc"><span class="type">GTypeClassCacheFunc</span></a> chain.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cache_data</code></em>&#160;:</span></p></td>
<td>data that was given to the <a class="link" href="gobject-Type-Information.html#g-type-add-class-cache-func"><code class="function">g_type_add_class_cache_func()</code></a> call
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>g_class</code></em>&#160;:</span></p></td>
<td>The <a class="link" href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure which is unreferenced
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>
<a
href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> to stop further <a class="link" href="gobject-Type-Information.html#GTypeClassCacheFunc"><span class="type">GTypeClassCacheFunc</span></a>s from being 
called, <a
href="./../glib/glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a> to continue.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2829015"></a><h3>
<a name="GTypeFlags"></a>enum GTypeFlags</h3>
<a class="indexterm" name="id2829027"></a><pre class="programlisting">typedef enum    /*&lt; skip &gt;*/
{
  G_TYPE_FLAG_ABSTRACT		= (1 &lt;&lt; 4),
  G_TYPE_FLAG_VALUE_ABSTRACT	= (1 &lt;&lt; 5)
} GTypeFlags;
</pre>
<p>
Bit masks used to check or determine characteristics of a type.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a name="G-TYPE-FLAG-ABSTRACT:CAPS"></a><code class="literal">G_TYPE_FLAG_ABSTRACT</code></span></p></td>
<td>	Indicates an abstract type. No instances can be
			created for an abstract type.
</td>
</tr>
<tr>
<td><p><span class="term"><a name="G-TYPE-FLAG-VALUE-ABSTRACT:CAPS"></a><code class="literal">G_TYPE_FLAG_VALUE_ABSTRACT</code></span></p></td>
<td>Indicates an abstract value type, i.e. a type
                        that introduces a value table, but can't be used for
                        <a class="link" href="gobject-Generic-values.html#g-value-init"><code class="function">g_value_init()</code></a>.

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2829110"></a><h3>
<a name="GTypeFundamentalFlags"></a>enum GTypeFundamentalFlags</h3>
<a class="indexterm" name="id2829123"></a><pre class="programlisting">typedef enum    /*&lt; skip &gt;*/
{
  G_TYPE_FLAG_CLASSED           = (1 &lt;&lt; 0),
  G_TYPE_FLAG_INSTANTIATABLE    = (1 &lt;&lt; 1),
  G_TYPE_FLAG_DERIVABLE         = (1 &lt;&lt; 2),
  G_TYPE_FLAG_DEEP_DERIVABLE    = (1 &lt;&lt; 3)
} GTypeFundamentalFlags;
</pre>
<p>
Bit masks used to check or determine specific characteristics of a
fundamental type.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a name="G-TYPE-FLAG-CLASSED:CAPS"></a><code class="literal">G_TYPE_FLAG_CLASSED</code></span></p></td>
<td>		Indicates a classed type.
</td>
</tr>
<tr>
<td><p><span class="term"><a name="G-TYPE-FLAG-INSTANTIATABLE:CAPS"></a><code class="literal">G_TYPE_FLAG_INSTANTIATABLE</code></span></p></td>
<td>	Indicates an instantiable type (implies classed).
</td>
</tr>
<tr>
<td><p><span class="term"><a name="G-TYPE-FLAG-DERIVABLE:CAPS"></a><code class="literal">G_TYPE_FLAG_DERIVABLE</code></span></p></td>
<td>	Indicates a flat derivable type.
</td>
</tr>
<tr>
<td><p><span class="term"><a name="G-TYPE-FLAG-DEEP-DERIVABLE:CAPS"></a><code class="literal">G_TYPE_FLAG_DEEP_DERIVABLE</code></span></p></td>
<td>	Indicates a deep derivable type (implies derivable).

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2829242"></a><h3>
<a name="g-type-register-static"></a>g_type_register_static ()</h3>
<a class="indexterm" name="id2829255"></a><pre class="programlisting"><a class="link" href="gobject-Type-Information.html#GType">GType</a>               g_type_register_static              (<a class="link" href="gobject-Type-Information.html#GType">GType</a> parent_type,
                                                         const <a
href="./../glib/glib/glib-Basic-Types.html#gchar"
>gchar</a> *type_name,
                                                         const <a class="link" href="gobject-Type-Information.html#GTypeInfo">GTypeInfo</a> *info,
                                                         <a class="link" href="gobject-Type-Information.html#GTypeFlags">GTypeFlags</a> flags);</pre>
<p>
Registers <em class="parameter"><code>type_name</code></em> as the name of a new static type derived from
<em class="parameter"><code>parent_type</code></em>.  The type system uses the information contained in the
<a class="link" href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> structure pointed to by <em class="parameter"><code>info</code></em> to manage the type and its
instances (if not abstract).  The value of <em class="parameter"><code>flags</code></em> determines the nature
(e.g. abstract or not) of the type.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>parent_type</code></em>&#160;:</span></p></td>
<td>	Type from which this type will be derived.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>type_name</code></em>&#160;:</span></p></td>
<td>	0-terminated string used as the name of the new type.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>info</code></em>&#160;:</span></p></td>
<td>		The <a class="link" href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> structure for this type.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em>&#160;:</span></p></td>
<td>		Bitwise combination of <a class="link" href="gobject-Type-Information.html#GTypeFlags"><span class="type">GTypeFlags</span></a> values.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>	The new type identifier.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2829431"></a><h3>
<a name="g-type-register-static-simple"></a>g_type_register_static_simple ()</h3>
<a class="indexterm" name="id2829446"></a><pre class="programlisting"><a class="link" href="gobject-Type-Information.html#GType">GType</a>               g_type_register_static_simple       (<a class="link" href="gobject-Type-Information.html#GType">GType</a> parent_type,
                                                         const <a
href="./../glib/glib/glib-Basic-Types.html#gchar"
>gchar</a> *type_name,
                                                         <a
href="./../glib/glib/glib-Basic-Types.html#guint"
>guint</a> class_size,
                                                         <a class="link" href="gobject-Type-Information.html#GClassInitFunc">GClassInitFunc</a> class_init,
                                                         <a
href="./../glib/glib/glib-Basic-Types.html#guint"
>guint</a> instance_size,
                                                         <a class="link" href="gobject-Type-Information.html#GInstanceInitFunc">GInstanceInitFunc</a> instance_init,
                                                         <a class="link" href="gobject-Type-Information.html#GTypeFlags">GTypeFlags</a> flags);</pre>
<p>
Registers <em class="parameter"><code>type_name</code></em> as the name of a new static type derived from
<em class="parameter"><code>parent_type</code></em>.  The value of <em class="parameter"><code>flags</code></em> determines the nature (e.g. 
abstract or not) of the type. It works by filling a <a class="link" href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> 
struct and calling <a class="link" href="gobject-Type-Information.html#g-type-register-static"><code class="function">g_type_register_static()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>parent_type</code></em>&#160;:</span></p></td>
<td>	Type from which this type will be derived.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>type_name</code></em>&#160;:</span></p></td>
<td>	0-terminated string used as the name of the new type.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>class_size</code></em>&#160;:</span></p></td>
<td>   Size of the class structure (see <a class="link" href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a>)
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>class_init</code></em>&#160;:</span></p></td>
<td>	Location of the class initialization function (see <a class="link" href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a>)
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>instance_size</code></em>&#160;:</span></p></td>
<td>Size of the instance structure (see <a class="link" href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a>)
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>instance_init</code></em>&#160;:</span></p></td>
<td>Location of the instance initialization function (see <a class="link" href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a>)
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em>&#160;:</span></p></td>
<td>	Bitwise combination of <a class="link" href="gobject-Type-Information.html#GTypeFlags"><span class="type">GTypeFlags</span></a> values.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>	The new type identifier.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since         2.12


</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2829725"></a><h3>
<a name="g-type-register-dynamic"></a>g_type_register_dynamic ()</h3>
<a class="indexterm" name="id2829739"></a><pre class="programlisting"><a class="link" href="gobject-Type-Information.html#GType">GType</a>               g_type_register_dynamic             (<a class="link" href="gobject-Type-Information.html#GType">GType</a> parent_type,
                                                         const <a
href="./../glib/glib/glib-Basic-Types.html#gchar"
>gchar</a> *type_name,
                                                         <a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin,
                                                         <a class="link" href="gobject-Type-Information.html#GTypeFlags">GTypeFlags</a> flags);</pre>
<p>
Registers <em class="parameter"><code>type_name</code></em> as the name of a new dynamic type derived from
<em class="parameter"><code>parent_type</code></em>.  The type system uses the information contained in the
<a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure pointed to by <em class="parameter"><code>plugin</code></em> to manage the type and its
instances (if not abstract).  The value of <em class="parameter"><code>flags</code></em> determines the nature
(e.g. abstract or not) of the type.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>parent_type</code></em>&#160;:</span></p></td>
<td>	Type from which this type will be derived.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>type_name</code></em>&#160;:</span></p></td>
<td>	0-terminated string used as the name of the new type.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>plugin</code></em>&#160;:</span></p></td>
<td>	The <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure to retrieve the <a class="link" href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> from.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em>&#160;:</span></p></td>
<td>		Bitwise combination of <a class="link" href="gobject-Type-Information.html#GTypeFlags"><span class="type">GTypeFlags</span></a> values.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>	The new type identifier or <a class="link" href="gobject-Type-Information.html#G-TYPE-INVALID:CAPS"><span class="type">G_TYPE_INVALID</span></a> if registration failed.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2829932"></a><h3>
<a name="g-type-register-fundamental"></a>g_type_register_fundamental ()</h3>
<a class="indexterm" name="id2829945"></a><pre class="programlisting"><a class="link" href="gobject-Type-Information.html#GType">GType</a>               g_type_register_fundamental         (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type_id,
                                                         const <a
href="./../glib/glib/glib-Basic-Types.html#gchar"
>gchar</a> *type_name,
                                                         const <a class="link" href="gobject-Type-Information.html#GTypeInfo">GTypeInfo</a> *info,
                                                         const <a class="link" href="gobject-Type-Information.html#GTypeFundamentalInfo">GTypeFundamentalInfo</a> *finfo,
                                                         <a class="link" href="gobject-Type-Information.html#GTypeFlags">GTypeFlags</a> flags);</pre>
<p>
Registers <em class="parameter"><code>type_id</code></em> as the predefined identifier and <em class="parameter"><code>type_name</code></em> as the
name of a fundamental type.  The type system uses the information
contained in the <a class="link" href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> structure pointed to by <em class="parameter"><code>info</code></em> and the 
<a class="link" href="gobject-Type-Information.html#GTypeFundamentalInfo"><span class="type">GTypeFundamentalInfo</span></a> structure pointed to by <em class="parameter"><code>finfo</code></em> to manage the
type and its instances.  The value of <em class="parameter"><code>flags</code></em> determines additional
characteristics of the fundamental type.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type_id</code></em>&#160;:</span></p></td>
<td>	A predefined <span class="type">GTypeFundamentals</span> value.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>type_name</code></em>&#160;:</span></p></td>
<td>	0-terminated string used as the name of the new type.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>info</code></em>&#160;:</span></p></td>
<td>		The <a class="link" href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> structure for this type.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>finfo</code></em>&#160;:</span></p></td>
<td>		The <a class="link" href="gobject-Type-Information.html#GTypeFundamentalInfo"><span class="type">GTypeFundamentalInfo</span></a> structure for this type.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em>&#160;:</span></p></td>
<td>		Bitwise combination of <a class="link" href="gobject-Type-Information.html#GTypeFlags"><span class="type">GTypeFlags</span></a> values.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>	The predefined type identifier.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2830177"></a><h3>
<a name="g-type-add-interface-static"></a>g_type_add_interface_static ()</h3>
<a class="indexterm" name="id2830190"></a><pre class="programlisting">void                g_type_add_interface_static         (<a class="link" href="gobject-Type-Information.html#GType">GType</a> instance_type,
                                                         <a class="link" href="gobject-Type-Information.html#GType">GType</a> interface_type,
                                                         const <a class="link" href="gobject-Type-Information.html#GInterfaceInfo">GInterfaceInfo</a> *info);</pre>
<p>
Adds the static <em class="parameter"><code>interface_type</code></em> to <em class="parameter"><code>instantiable_type</code></em>.  The information
contained in the <span class="type">GTypeInterfaceInfo</span> structure pointed to by <em class="parameter"><code>info</code></em>
is used to manage the relationship.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>instance_type</code></em>&#160;:</span></p></td>
<td>	 <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value of an instantiable type.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>interface_type</code></em>&#160;:</span></p></td>
<td>
<a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value of an interface type.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>info</code></em>&#160;:</span></p></td>
<td>		 The <a class="link" href="gobject-Type-Information.html#GInterfaceInfo"><span class="type">GInterfaceInfo</span></a> structure for this
		 (<em class="parameter"><code>instance_type</code></em>, <em class="parameter"><code>interface_type</code></em>) combination.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2830346"></a><h3>
<a name="g-type-add-interface-dynamic"></a>g_type_add_interface_dynamic ()</h3>
<a class="indexterm" name="id2830359"></a><pre class="programlisting">void                g_type_add_interface_dynamic        (<a class="link" href="gobject-Type-Information.html#GType">GType</a> instance_type,
                                                         <a class="link" href="gobject-Type-Information.html#GType">GType</a> interface_type,
                                                         <a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin);</pre>
<p>
Adds the dynamic <em class="parameter"><code>interface_type</code></em> to <em class="parameter"><code>instantiable_type</code></em>. The information
contained in the <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure pointed to by <em class="parameter"><code>plugin</code></em>
is used to manage the relationship.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>instance_type</code></em>&#160;:</span></p></td>
<td>the <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value of an instantiable type.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>interface_type</code></em>&#160;:</span></p></td>
<td>the <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value of an interface type.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>plugin</code></em>&#160;:</span></p></td>
<td>the <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure to retrieve the <a class="link" href="gobject-Type-Information.html#GInterfaceInfo"><span class="type">GInterfaceInfo</span></a> from.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2830511"></a><h3>
<a name="g-type-interface-add-prerequisite"></a>g_type_interface_add_prerequisite ()</h3>
<a class="indexterm" name="id2830525"></a><pre class="programlisting">void                g_type_interface_add_prerequisite   (<a class="link" href="gobject-Type-Information.html#GType">GType</a> interface_type,
                                                         <a class="link" href="gobject-Type-Information.html#GType">GType</a> prerequisite_type);</pre>
<p>
Adds <em class="parameter"><code>prerequisite_type</code></em> to the list of prerequisites of <em class="parameter"><code>interface_type</code></em>.
This means that any type implementing <em class="parameter"><code>interface_type</code></em> must also implement
<em class="parameter"><code>prerequisite_type</code></em>. Prerequisites can be thought of as an alternative to
interface derivation (which GType doesn't support). An interface can have
at most one instantiatable prerequisite type.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>interface_type</code></em>&#160;:</span></p></td>
<td>
<a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value of an interface type.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>prerequisite_type</code></em>&#160;:</span></p></td>
<td>
<a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value of an interface or instantiatable type.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2830637"></a><h3>
<a name="g-type-get-plugin"></a>g_type_get_plugin ()</h3>
<a class="indexterm" name="id2830650"></a><pre class="programlisting"><a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a>*        g_type_get_plugin                   (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type);</pre>
<p>
Returns the <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure for <em class="parameter"><code>type</code></em> or
<a
href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if <em class="parameter"><code>type</code></em> does not have a <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></p></td>
<td>		The <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> to retrieve the plugin for.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>	The corresponding plugin if <em class="parameter"><code>type</code></em> is a dynamic type,
		<a
href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> otherwise.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2830771"></a><h3>
<a name="g-type-interface-get-plugin"></a>g_type_interface_get_plugin ()</h3>
<a class="indexterm" name="id2830784"></a><pre class="programlisting"><a class="link" href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a>*        g_type_interface_get_plugin         (<a class="link" href="gobject-Type-Information.html#GType">GType</a> instance_type,
                                                         <a class="link" href="gobject-Type-Information.html#GType">GType</a> interface_type);</pre>
<p>
Returns the <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure for the dynamic interface 
<em class="parameter"><code>interface_type</code></em> which has been added to <em class="parameter"><code>instance_type</code></em>, or 
<a
href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if <em class="parameter"><code>interface_type</code></em> has not been added to <em class="parameter"><code>instance_type</code></em> or does 
not have a <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure. See <a class="link" href="gobject-Type-Information.html#g-type-add-interface-dynamic"><code class="function">g_type_add_interface_dynamic()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>instance_type</code></em>&#160;:</span></p></td>
<td>the <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value of an instantiatable type.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>interface_type</code></em>&#160;:</span></p></td>
<td>the <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value of an interface type.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>the <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> for the dynamic interface <em class="parameter"><code>interface_type</code></em>
   of <em class="parameter"><code>instance_type</code></em>.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2830964"></a><h3>
<a name="g-type-fundamental-next"></a>g_type_fundamental_next ()</h3>
<a class="indexterm" name="id2830977"></a><pre class="programlisting"><a class="link" href="gobject-Type-Information.html#GType">GType</a>               g_type_fundamental_next             (void);</pre>
<p>
Returns the next free fundamental type id which can be used to
register a new fundamental type with <a class="link" href="gobject-Type-Information.html#g-type-register-fundamental"><code class="function">g_type_register_fundamental()</code></a>.
The returned type ID represents the highest currently registered
fundamental type identifier.

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>The nextmost fundamental type ID to be registered,
          or 0 if the type system ran out of fundamental type IDs.


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2831030"></a><h3>
<a name="g-type-fundamental"></a>g_type_fundamental ()</h3>
<a class="indexterm" name="id2831043"></a><pre class="programlisting"><a class="link" href="gobject-Type-Information.html#GType">GType</a>               g_type_fundamental                  (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type_id);</pre>
<p>
Internal function, used to extract the fundamental type ID portion.
use <a class="link" href="gobject-Type-Information.html#G-TYPE-FUNDAMENTAL:CAPS"><code class="function">G_TYPE_FUNDAMENTAL()</code></a> instead.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type_id</code></em>&#160;:</span></p></td>
<td>valid type ID
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>fundamental type ID


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2831113"></a><h3>
<a name="g-type-create-instance"></a>g_type_create_instance ()</h3>
<a class="indexterm" name="id2831125"></a><pre class="programlisting"><a class="link" href="gobject-Type-Information.html#GTypeInstance">GTypeInstance</a>*      g_type_create_instance              (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type);</pre>
<p>
Creates and initializes an instance of <em class="parameter"><code>type</code></em> if <em class="parameter"><code>type</code></em> is valid and can
be instantiated. The type system only performs basic allocation and
structure setups for instances: actual instance creation should happen
through functions supplied by the type's fundamental type implementation.
So use of <a class="link" href="gobject-Type-Information.html#g-type-create-instance"><code class="function">g_type_create_instance()</code></a> is reserved for implementators of
fundamental types only. E.g. instances of the <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> hierarchy
should be created via <a class="link" href="gobject-The-Base-Object-Type.html#g-object-new"><code class="function">g_object_new()</code></a> and <span class="emphasis"><em>never</em></span>
directly through <a class="link" href="gobject-Type-Information.html#g-type-create-instance"><code class="function">g_type_create_instance()</code></a> which doesn't handle
things like singleton objects or object construction.
Note: Do <span class="emphasis"><em>not</em></span> use this function, unless you're
implementing a fundamental type. Also language bindings should <span class="emphasis"><em>not</em></span>
use this function but <a class="link" href="gobject-The-Base-Object-Type.html#g-object-new"><code class="function">g_object_new()</code></a> instead.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></p></td>
<td>	  An instantiatable type to create an instance for.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>An allocated and initialized instance, subject to further
	  treatment by the fundamental type implementation.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2831269"></a><h3>
<a name="g-type-free-instance"></a>g_type_free_instance ()</h3>
<a class="indexterm" name="id2831282"></a><pre class="programlisting">void                g_type_free_instance                (<a class="link" href="gobject-Type-Information.html#GTypeInstance">GTypeInstance</a> *instance);</pre>
<p>
Frees an instance of a type, returning it to the instance pool for the type,
if there is one.
</p>
<p>
Like <a class="link" href="gobject-Type-Information.html#g-type-create-instance"><code class="function">g_type_create_instance()</code></a>, this function is reserved for implementors of 
fundamental types.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>instance</code></em>&#160;:</span></p></td>
<td>an instance of a type.


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2831346"></a><h3>
<a name="g-type-add-class-cache-func"></a>g_type_add_class_cache_func ()</h3>
<a class="indexterm" name="id2831360"></a><pre class="programlisting">void                g_type_add_class_cache_func         (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> cache_data,
                                                         <a class="link" href="gobject-Type-Information.html#GTypeClassCacheFunc">GTypeClassCacheFunc</a> cache_func);</pre>
<p>
Adds a <a class="link" href="gobject-Type-Information.html#GTypeClassCacheFunc"><span class="type">GTypeClassCacheFunc</span></a> to be called before the reference count of a class 
goes from one to zero. This can be used to prevent premature class destruction.
All installed <a class="link" href="gobject-Type-Information.html#GTypeClassCacheFunc"><span class="type">GTypeClassCacheFunc</span></a> functions will be chained until one of them 
returns <a
href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a>. The functions have to check the class id passed in to figure 
whether they actually want to cache the class of this type, since all classes
are routed through the same <a class="link" href="gobject-Type-Information.html#GTypeClassCacheFunc"><span class="type">GTypeClassCacheFunc</span></a> chain.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cache_data</code></em>&#160;:</span></p></td>
<td>data to be passed to <em class="parameter"><code>cache_func</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cache_func</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="gobject-Type-Information.html#GTypeClassCacheFunc"><span class="type">GTypeClassCacheFunc</span></a>


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2831483"></a><h3>
<a name="g-type-remove-class-cache-func"></a>g_type_remove_class_cache_func ()</h3>
<a class="indexterm" name="id2831497"></a><pre class="programlisting">void                g_type_remove_class_cache_func      (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> cache_data,
                                                         <a class="link" href="gobject-Type-Information.html#GTypeClassCacheFunc">GTypeClassCacheFunc</a> cache_func);</pre>
<p>
Removes a previously installed <a class="link" href="gobject-Type-Information.html#GTypeClassCacheFunc"><span class="type">GTypeClassCacheFunc</span></a>. The cache maintained 
by <em class="parameter"><code>cache_func</code></em> has to be empty when calling <a class="link" href="gobject-Type-Information.html#g-type-remove-class-cache-func"><code class="function">g_type_remove_class_cache_func()</code></a> 
to avoid leaks.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>cache_data</code></em>&#160;:</span></p></td>
<td>data that was given when adding <em class="parameter"><code>cache_func</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cache_func</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="gobject-Type-Information.html#GTypeClassCacheFunc"><span class="type">GTypeClassCacheFunc</span></a>


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2831607"></a><h3>
<a name="g-type-class-unref-uncached"></a>g_type_class_unref_uncached ()</h3>
<a class="indexterm" name="id2831621"></a><pre class="programlisting">void                g_type_class_unref_uncached         (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class);</pre>
<p>
A variant of <a class="link" href="gobject-Type-Information.html#g-type-class-unref"><code class="function">g_type_class_unref()</code></a> for use in <a class="link" href="gobject-Type-Information.html#GTypeClassCacheFunc"><span class="type">GTypeClassCacheFunc</span></a>
implementations. It unreferences a class without consulting the chain
of <a class="link" href="gobject-Type-Information.html#GTypeClassCacheFunc"><span class="type">GTypeClassCacheFunc</span></a>s, avoiding the recursion which would occur
otherwise.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>g_class</code></em>&#160;:</span></p></td>
<td>The <a class="link" href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure to unreference.


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2831706"></a><h3>
<a name="g-type-add-interface-check"></a>g_type_add_interface_check ()</h3>
<a class="indexterm" name="id2831722"></a><pre class="programlisting">void                g_type_add_interface_check          (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> check_data,
                                                         <a class="link" href="gobject-Type-Information.html#GTypeInterfaceCheckFunc">GTypeInterfaceCheckFunc</a> check_func);</pre>
<p>
Adds a function to be called after an interface vtable is
initialized for any class (i.e. after the <em class="parameter"><code>interface_init</code></em>
member of <a class="link" href="gobject-Type-Information.html#GInterfaceInfo"><span class="type">GInterfaceInfo</span></a> has been called).
</p>
<p>
This function is useful when you want to check an invariant
that depends on the interfaces of a class. For instance,
the implementation of <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> uses this facility to check
that an object implements all of the properties that are
defined on its interfaces.    
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>check_data</code></em>&#160;:</span></p></td>
<td>data to pass to <em class="parameter"><code>check_func</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>check_func</code></em>&#160;:</span></p></td>
<td>function to be called after each interface
   is initialized.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4


</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2831837"></a><h3>
<a name="g-type-remove-interface-check"></a>g_type_remove_interface_check ()</h3>
<a class="indexterm" name="id2831853"></a><pre class="programlisting">void                g_type_remove_interface_check       (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> check_data,
                                                         <a class="link" href="gobject-Type-Information.html#GTypeInterfaceCheckFunc">GTypeInterfaceCheckFunc</a> check_func);</pre>
<p>
Removes an interface check function added with
<a class="link" href="gobject-Type-Information.html#g-type-add-interface-check"><code class="function">g_type_add_interface_check()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>check_data</code></em>&#160;:</span></p></td>
<td>callback data passed to <a class="link" href="gobject-Type-Information.html#g-type-add-interface-check"><code class="function">g_type_add_interface_check()</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>check_func</code></em>&#160;:</span></p></td>
<td>callback function passed to <a class="link" href="gobject-Type-Information.html#g-type-add-interface-check"><code class="function">g_type_add_interface_check()</code></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4


</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2831964"></a><h3>
<a name="GTypeInterfaceCheckFunc"></a>GTypeInterfaceCheckFunc ()</h3>
<a class="indexterm" name="id2831979"></a><pre class="programlisting">void                (*GTypeInterfaceCheckFunc)          (<a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> check_data,
                                                         <a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_iface);</pre>
<p>
A callback called after an interface vtable is initialized.
See <a class="link" href="gobject-Type-Information.html#g-type-add-interface-check"><code class="function">g_type_add_interface_check()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>check_data</code></em>&#160;:</span></p></td>
<td>data passed to <a class="link" href="gobject-Type-Information.html#g-type-add-interface-check"><code class="function">g_type_add_interface_check()</code></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>g_iface</code></em>&#160;:</span></p></td>
<td>the interface that has been initialized
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4


</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2832078"></a><h3>
<a name="g-type-value-table-peek"></a>g_type_value_table_peek ()</h3>
<a class="indexterm" name="id2832090"></a><pre class="programlisting"><a class="link" href="gobject-Type-Information.html#GTypeValueTable">GTypeValueTable</a>*    g_type_value_table_peek             (<a class="link" href="gobject-Type-Information.html#GType">GType</a> type);</pre>
<p>
Returns the location of the <a class="link" href="gobject-Type-Information.html#GTypeValueTable"><span class="type">GTypeValueTable</span></a> associated with <em class="parameter"><code>type</code></em>.
<span class="emphasis"><em>Note that this function should only be used from source code
that implements or has internal knowledge of the implementation of
<em class="parameter"><code>type</code></em>.</em></span>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></p></td>
<td>   A <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>Location of the <a class="link" href="gobject-Type-Information.html#GTypeValueTable"><span class="type">GTypeValueTable</span></a> associated with <em class="parameter"><code>type</code></em> or
          <a
href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if there is no <a class="link" href="gobject-Type-Information.html#GTypeValueTable"><span class="type">GTypeValueTable</span></a> associated with <em class="parameter"><code>type</code></em>.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2832221"></a><h3>
<a name="G-DEFINE-TYPE:CAPS"></a>G_DEFINE_TYPE()</h3>
<a class="indexterm" name="id2832236"></a><pre class="programlisting">#define G_DEFINE_TYPE(TN, t_n, T_P)			    G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, 0, {})
</pre>
<p>
A convenience macro for type implementations, which declares a 
class initialization function, an instance initialization function (see <a class="link" href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> for information about 
these) and a static variable named <em class="parameter"><code>t_n</code></em>_parent_class pointing to the parent class. Furthermore, it defines 
a *<code class="function">_get_type()</code> function. See <a class="link" href="gobject-Type-Information.html#G-DEFINE-TYPE-EXTENDED:CAPS"><code class="function">G_DEFINE_TYPE_EXTENDED()</code></a> for an example.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>TN</code></em>&#160;:</span></p></td>
<td>The name of the new type, in Camel case.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>t_n</code></em>&#160;:</span></p></td>
<td>The name of the new type, in lowercase, with words 
  separated by '_'.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>T_P</code></em>&#160;:</span></p></td>
<td>The <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> of the parent type.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4


</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2832356"></a><h3>
<a name="G-DEFINE-TYPE-WITH-CODE:CAPS"></a>G_DEFINE_TYPE_WITH_CODE()</h3>
<a class="indexterm" name="id2832372"></a><pre class="programlisting">#define G_DEFINE_TYPE_WITH_CODE(TN, t_n, T_P, _C_)	    _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, 0) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
</pre>
<p>
A convenience macro for type implementations.  
Similar to <a class="link" href="gobject-Type-Information.html#G-DEFINE-TYPE:CAPS"><code class="function">G_DEFINE_TYPE()</code></a>, but allows to insert custom code into the 
*<code class="function">_get_type()</code> function, e.g. interface implementations via <a class="link" href="gobject-Type-Information.html#G-IMPLEMENT-INTERFACE:CAPS"><code class="function">G_IMPLEMENT_INTERFACE()</code></a>.
See <a class="link" href="gobject-Type-Information.html#G-DEFINE-TYPE-EXTENDED:CAPS"><code class="function">G_DEFINE_TYPE_EXTENDED()</code></a> for an example.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>TN</code></em>&#160;:</span></p></td>
<td>The name of the new type, in Camel case.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>t_n</code></em>&#160;:</span></p></td>
<td>The name of the new type in lowercase, with words separated by '_'.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>T_P</code></em>&#160;:</span></p></td>
<td>The <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> of the parent type.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>_C_</code></em>&#160;:</span></p></td>
<td>Custom code that gets inserted in the *<code class="function">_get_type()</code> function.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4


</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2832521"></a><h3>
<a name="G-DEFINE-ABSTRACT-TYPE:CAPS"></a>G_DEFINE_ABSTRACT_TYPE()</h3>
<a class="indexterm" name="id2832536"></a><pre class="programlisting">#define G_DEFINE_ABSTRACT_TYPE(TN, t_n, T_P)		    G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, G_TYPE_FLAG_ABSTRACT, {})
</pre>
<p>
A convenience macro for type implementations. 
Similar to <a class="link" href="gobject-Type-Information.html#G-DEFINE-TYPE:CAPS"><code class="function">G_DEFINE_TYPE()</code></a>, but defines an abstract type. 
See <a class="link" href="gobject-Type-Information.html#G-DEFINE-TYPE-EXTENDED:CAPS"><code class="function">G_DEFINE_TYPE_EXTENDED()</code></a> for an example.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>TN</code></em>&#160;:</span></p></td>
<td>The name of the new type, in Camel case.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>t_n</code></em>&#160;:</span></p></td>
<td>The name of the new type, in lowercase, with words 
  separated by '_'.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>T_P</code></em>&#160;:</span></p></td>
<td>The <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> of the parent type.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4


</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2832638"></a><h3>
<a name="G-DEFINE-ABSTRACT-TYPE-WITH-CODE:CAPS"></a>G_DEFINE_ABSTRACT_TYPE_WITH_CODE()</h3>
<a class="indexterm" name="id2832654"></a><pre class="programlisting">#define G_DEFINE_ABSTRACT_TYPE_WITH_CODE(TN, t_n, T_P, _C_) _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, G_TYPE_FLAG_ABSTRACT) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
</pre>
<p>
A convenience macro for type implementations.
Similar to <a class="link" href="gobject-Type-Information.html#G-DEFINE-TYPE-WITH-CODE:CAPS"><code class="function">G_DEFINE_TYPE_WITH_CODE()</code></a>, but defines an abstract type and allows to 
insert custom code into the *<code class="function">_get_type()</code> function, e.g. interface implementations 
via <a class="link" href="gobject-Type-Information.html#G-IMPLEMENT-INTERFACE:CAPS"><code class="function">G_IMPLEMENT_INTERFACE()</code></a>. See <a class="link" href="gobject-Type-Information.html#G-DEFINE-TYPE-EXTENDED:CAPS"><code class="function">G_DEFINE_TYPE_EXTENDED()</code></a> for an example.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>TN</code></em>&#160;:</span></p></td>
<td>The name of the new type, in Camel case.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>t_n</code></em>&#160;:</span></p></td>
<td>The name of the new type, in lowercase, with words 
  separated by '_'.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>T_P</code></em>&#160;:</span></p></td>
<td>The <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> of the parent type.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>_C_</code></em>&#160;:</span></p></td>
<td>Custom code that gets inserted in the @<code class="function">type_name_get_type()</code> function.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4


</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2832805"></a><h3>
<a name="G-IMPLEMENT-INTERFACE:CAPS"></a>G_IMPLEMENT_INTERFACE()</h3>
<a class="indexterm" name="id2832821"></a><pre class="programlisting">#define             G_IMPLEMENT_INTERFACE(TYPE_IFACE, iface_init)</pre>
<p>
A convenience macro to ease interface addition in the <em class="parameter"><code>_C_</code></em> section
of <a class="link" href="gobject-Type-Information.html#G-DEFINE-TYPE-WITH-CODE:CAPS"><code class="function">G_DEFINE_TYPE_WITH_CODE()</code></a> or <a class="link" href="gobject-Type-Information.html#G-DEFINE-ABSTRACT-TYPE-WITH-CODE:CAPS"><code class="function">G_DEFINE_ABSTRACT_TYPE_WITH_CODE()</code></a>. 
See <a class="link" href="gobject-Type-Information.html#G-DEFINE-TYPE-EXTENDED:CAPS"><code class="function">G_DEFINE_TYPE_EXTENDED()</code></a> for an example.
</p>
<p>
Note that this macro can only be used together with the G_DEFINE_TYPE_*
macros, since it depends on variable names from those macros.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>TYPE_IFACE</code></em>&#160;:</span></p></td>
<td>The <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> of the interface to add
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>iface_init</code></em>&#160;:</span></p></td>
<td>The interface init function
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4


</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2832932"></a><h3>
<a name="G-DEFINE-TYPE-EXTENDED:CAPS"></a>G_DEFINE_TYPE_EXTENDED()</h3>
<a class="indexterm" name="id2832947"></a><pre class="programlisting">#define G_DEFINE_TYPE_EXTENDED(TN, t_n, T_P, _f_, _C_)	    _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, _f_) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
</pre>
<p>
The most general convenience macro for type implementations, on which 
<a class="link" href="gobject-Type-Information.html#G-DEFINE-TYPE:CAPS"><code class="function">G_DEFINE_TYPE()</code></a>, etc are based. 
</p>
<div class="informalexample">
<pre class="programlisting">
G_DEFINE_TYPE_EXTENDED (GtkGadget, 
                        gtk_gadget, 
                        GTK_TYPE_WIDGET,
                        0, 
                        G_IMPLEMENT_INTERFACE (TYPE_GIZMO, 
                                               gtk_gadget_gizmo_init));
</pre>
expands to
<pre class="programlisting">
static void     gtk_gadget_init       (GtkGadget      *self);
static void     gtk_gadget_class_init (GtkGadgetClass *klass);
static gpointer gtk_gadget_parent_class = NULL;
static void     gtk_gadget_class_intern_init (gpointer klass)
{
  gtk_gadget_parent_class = g_type_class_peek_parent (klass);
  gtk_gadget_class_init ((GtkGadgetClass*) klass);
}

GType
gtk_gadget_get_type (void)
{
  static GType g_define_type_id = 0; 
  if (G_UNLIKELY (g_define_type_id == 0)) 
    { 
      static const GTypeInfo g_define_type_info = { 
        sizeof (GtkGadgetClass), 
        (GBaseInitFunc) NULL, 
        (GBaseFinalizeFunc) NULL, 
        (GClassInitFunc) gtk_gadget_class_intern_init, 
        (GClassFinalizeFunc) NULL, 
        NULL,   /* class_data */ 
        sizeof (GtkGadget), 
        0,      /* n_preallocs */ 
        (GInstanceInitFunc) gtk_gadget_init, 
      }; 
      g_define_type_id = g_type_register_static (GTK_TYPE_WIDGET, "GtkGadget", &amp;g_define_type_info, 0); 
      {
        static const GInterfaceInfo g_implement_interface_info = {
          (GInterfaceInitFunc) gtk_gadget_gizmo_init
        };
        g_type_add_interface_static (g_define_type_id, TYPE_GIZMO, &amp;g_implement_interface_info);
      } 
    } 
  return g_define_type_id; 
}
</pre>
The only pieces which have to be manually provided are the definitions of the 
instance and class structure and the definitions of the instance and class 
init functions.
</div>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>TN</code></em>&#160;:</span></p></td>
<td>The name of the new type, in Camel case.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>t_n</code></em>&#160;:</span></p></td>
<td>The name of the new type, in lowercase, with words 
  separated by '_'.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>T_P</code></em>&#160;:</span></p></td>
<td>The <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> of the parent type.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>_f_</code></em>&#160;:</span></p></td>
<td>
<a class="link" href="gobject-Type-Information.html#GTypeFlags"><span class="type">GTypeFlags</span></a> to pass to <a class="link" href="gobject-Type-Information.html#g-type-register-static"><code class="function">g_type_register_static()</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>_C_</code></em>&#160;:</span></p></td>
<td>Custom code that gets inserted in the *<code class="function">_get_type()</code> function.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4


</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2833143"></a><h3>
<a name="G-TYPE-INVALID:CAPS"></a>G_TYPE_INVALID</h3>
<a class="indexterm" name="id2833155"></a><pre class="programlisting">#define G_TYPE_INVALID			G_TYPE_MAKE_FUNDAMENTAL (0)
</pre>
<p>
An invalid <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> used as error return value in some functions which return
a <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a>. 
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2833188"></a><h3>
<a name="G-TYPE-NONE:CAPS"></a>G_TYPE_NONE</h3>
<a class="indexterm" name="id2833201"></a><pre class="programlisting">#define G_TYPE_NONE			G_TYPE_MAKE_FUNDAMENTAL (1)
</pre>
<p>
A fundamental type which is used as a replacement for the C
<code class="literal">void</code> return type.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2833223"></a><h3>
<a name="G-TYPE-INTERFACE:CAPS"></a>G_TYPE_INTERFACE</h3>
<a class="indexterm" name="id2833236"></a><pre class="programlisting">#define G_TYPE_INTERFACE		G_TYPE_MAKE_FUNDAMENTAL (2)
</pre>
<p>
The fundamental type from which all interfaces are derived.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2833253"></a><h3>
<a name="G-TYPE-CHAR:CAPS"></a>G_TYPE_CHAR</h3>
<a class="indexterm" name="id2833266"></a><pre class="programlisting">#define G_TYPE_CHAR			G_TYPE_MAKE_FUNDAMENTAL (3)
</pre>
<p>
    The fundamental type corresponding to <a
href="./../glib/glib/glib-Basic-Types.html#gchar"
><span class="type">gchar</span></a>.
    The type designated by G_TYPE_CHAR is unconditionally an 8-bit signed integer.
    This may or may not be the same type a the C type "gchar".
  </p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2833292"></a><h3>
<a name="G-TYPE-UCHAR:CAPS"></a>G_TYPE_UCHAR</h3>
<a class="indexterm" name="id2833305"></a><pre class="programlisting">#define G_TYPE_UCHAR			G_TYPE_MAKE_FUNDAMENTAL (4)
</pre>
<p>
The fundamental type corresponding to <a
href="./../glib/glib/glib-Basic-Types.html#guchar"
><span class="type">guchar</span></a>.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2833330"></a><h3>
<a name="G-TYPE-BOOLEAN:CAPS"></a>G_TYPE_BOOLEAN</h3>
<a class="indexterm" name="id2833343"></a><pre class="programlisting">#define G_TYPE_BOOLEAN			G_TYPE_MAKE_FUNDAMENTAL (5)
</pre>
<p>
The fundamental type corresponding to <a
href="./../glib/glib/glib-Basic-Types.html#gboolean"
><span class="type">gboolean</span></a>.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2833368"></a><h3>
<a name="G-TYPE-INT:CAPS"></a>G_TYPE_INT</h3>
<a class="indexterm" name="id2833381"></a><pre class="programlisting">#define G_TYPE_INT			G_TYPE_MAKE_FUNDAMENTAL (6)
</pre>
<p>
The fundamental type corresponding to <a
href="./../glib/glib/glib-Basic-Types.html#gint"
><span class="type">gint</span></a>.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2833405"></a><h3>
<a name="G-TYPE-UINT:CAPS"></a>G_TYPE_UINT</h3>
<a class="indexterm" name="id2833418"></a><pre class="programlisting">#define G_TYPE_UINT			G_TYPE_MAKE_FUNDAMENTAL (7)
</pre>
<p>
The fundamental type corresponding to <a
href="./../glib/glib/glib-Basic-Types.html#guint"
><span class="type">guint</span></a>.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2833442"></a><h3>
<a name="G-TYPE-LONG:CAPS"></a>G_TYPE_LONG</h3>
<a class="indexterm" name="id2833454"></a><pre class="programlisting">#define G_TYPE_LONG			G_TYPE_MAKE_FUNDAMENTAL (8)
</pre>
<p>
The fundamental type corresponding to <a
href="./../glib/glib/glib-Basic-Types.html#glong"
><span class="type">glong</span></a>.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2833478"></a><h3>
<a name="G-TYPE-ULONG:CAPS"></a>G_TYPE_ULONG</h3>
<a class="indexterm" name="id2833491"></a><pre class="programlisting">#define G_TYPE_ULONG			G_TYPE_MAKE_FUNDAMENTAL (9)
</pre>
<p>
The fundamental type corresponding to <a
href="./../glib/glib/glib-Basic-Types.html#gulong"
><span class="type">gulong</span></a>.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2833516"></a><h3>
<a name="G-TYPE-INT64:CAPS"></a>G_TYPE_INT64</h3>
<a class="indexterm" name="id2833529"></a><pre class="programlisting">#define G_TYPE_INT64			G_TYPE_MAKE_FUNDAMENTAL (10)
</pre>
<p>
The fundamental type corresponding to <a
href="./../glib/glib/glib-Basic-Types.html#gint64"
><span class="type">gint64</span></a>.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2833555"></a><h3>
<a name="G-TYPE-UINT64:CAPS"></a>G_TYPE_UINT64</h3>
<a class="indexterm" name="id2833568"></a><pre class="programlisting">#define G_TYPE_UINT64			G_TYPE_MAKE_FUNDAMENTAL (11)
</pre>
<p>
The fundamental type corresponding to <a
href="./../glib/glib/glib-Basic-Types.html#guint64"
><span class="type">guint64</span></a>.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2833593"></a><h3>
<a name="G-TYPE-ENUM:CAPS"></a>G_TYPE_ENUM</h3>
<a class="indexterm" name="id2833606"></a><pre class="programlisting">#define G_TYPE_ENUM			G_TYPE_MAKE_FUNDAMENTAL (12)
</pre>
<p>
The fundamental type from which all enumeration types are derived.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2833623"></a><h3>
<a name="G-TYPE-FLAGS:CAPS"></a>G_TYPE_FLAGS</h3>
<a class="indexterm" name="id2833636"></a><pre class="programlisting">#define G_TYPE_FLAGS			G_TYPE_MAKE_FUNDAMENTAL (13)
</pre>
<p>
The fundamental type from which all flags types are derived.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2833653"></a><h3>
<a name="G-TYPE-FLOAT:CAPS"></a>G_TYPE_FLOAT</h3>
<a class="indexterm" name="id2833665"></a><pre class="programlisting">#define G_TYPE_FLOAT			G_TYPE_MAKE_FUNDAMENTAL (14)
</pre>
<p>
The fundamental type corresponding to <a
href="./../glib/glib/glib-Basic-Types.html#gfloat"
><span class="type">gfloat</span></a>.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2833690"></a><h3>
<a name="G-TYPE-DOUBLE:CAPS"></a>G_TYPE_DOUBLE</h3>
<a class="indexterm" name="id2833702"></a><pre class="programlisting">#define G_TYPE_DOUBLE			G_TYPE_MAKE_FUNDAMENTAL (15)
</pre>
<p>
The fundamental type corresponding to <a
href="./../glib/glib/glib-Basic-Types.html#gdouble"
><span class="type">gdouble</span></a>.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2833728"></a><h3>
<a name="G-TYPE-STRING:CAPS"></a>G_TYPE_STRING</h3>
<a class="indexterm" name="id2833740"></a><pre class="programlisting">#define G_TYPE_STRING			G_TYPE_MAKE_FUNDAMENTAL (16)
</pre>
<p>
The fundamental type corresponding to nul-terminated C strings.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2833757"></a><h3>
<a name="G-TYPE-POINTER:CAPS"></a>G_TYPE_POINTER</h3>
<a class="indexterm" name="id2833769"></a><pre class="programlisting">#define G_TYPE_POINTER			G_TYPE_MAKE_FUNDAMENTAL (17)
</pre>
<p>
The fundamental type corresponding to <a
href="./../glib/glib/glib-Basic-Types.html#gpointer"
><span class="type">gpointer</span></a>.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2833794"></a><h3>
<a name="G-TYPE-BOXED:CAPS"></a>G_TYPE_BOXED</h3>
<a class="indexterm" name="id2833806"></a><pre class="programlisting">#define G_TYPE_BOXED			G_TYPE_MAKE_FUNDAMENTAL (18)
</pre>
<p>
The fundamental type from which all boxed types are derived.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2833823"></a><h3>
<a name="G-TYPE-PARAM:CAPS"></a>G_TYPE_PARAM</h3>
<a class="indexterm" name="id2833835"></a><pre class="programlisting">#define G_TYPE_PARAM			G_TYPE_MAKE_FUNDAMENTAL (19)
</pre>
<p>
The fundamental type from which all <a class="link" href="gobject-GParamSpec.html#GParamSpec"><span class="type">GParamSpec</span></a> types are derived.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2833860"></a><h3>
<a name="G-TYPE-OBJECT:CAPS"></a>G_TYPE_OBJECT</h3>
<a class="indexterm" name="id2833872"></a><pre class="programlisting">#define G_TYPE_OBJECT			G_TYPE_MAKE_FUNDAMENTAL (20)
</pre>
<p>
The fundamental type for <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2833896"></a><h3>
<a name="G-TYPE-GTYPE:CAPS"></a>G_TYPE_GTYPE</h3>
<a class="indexterm" name="id2833909"></a><pre class="programlisting">#define	G_TYPE_GTYPE			 (g_gtype_get_type())
</pre>
<p>
The type for <a class="link" href="gobject-Type-Information.html#GType"><span class="type">GType</span></a>.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2833933"></a><h3>
<a name="G-TYPE-RESERVED-GLIB-FIRST:CAPS"></a>G_TYPE_RESERVED_GLIB_FIRST</h3>
<a class="indexterm" name="id2833947"></a><pre class="programlisting">#define G_TYPE_RESERVED_GLIB_FIRST	(21)
</pre>
<p>
First fundamental type number to create a new fundamental type id with
<a class="link" href="gobject-Type-Information.html#G-TYPE-MAKE-FUNDAMENTAL:CAPS"><code class="function">G_TYPE_MAKE_FUNDAMENTAL()</code></a> reserved for GLib.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2833975"></a><h3>
<a name="G-TYPE-RESERVED-GLIB-LAST:CAPS"></a>G_TYPE_RESERVED_GLIB_LAST</h3>
<a class="indexterm" name="id2833988"></a><pre class="programlisting">#define G_TYPE_RESERVED_GLIB_LAST	(31)
</pre>
<p>
Last fundamental type number reserved for GLib.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2834005"></a><h3>
<a name="G-TYPE-RESERVED-BSE-FIRST:CAPS"></a>G_TYPE_RESERVED_BSE_FIRST</h3>
<a class="indexterm" name="id2834019"></a><pre class="programlisting">#define G_TYPE_RESERVED_BSE_FIRST	(32)
</pre>
<p>
First fundamental type number to create a new fundamental type id with
<a class="link" href="gobject-Type-Information.html#G-TYPE-MAKE-FUNDAMENTAL:CAPS"><code class="function">G_TYPE_MAKE_FUNDAMENTAL()</code></a> reserved for BSE.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2834047"></a><h3>
<a name="G-TYPE-RESERVED-BSE-LAST:CAPS"></a>G_TYPE_RESERVED_BSE_LAST</h3>
<a class="indexterm" name="id2834061"></a><pre class="programlisting">#define G_TYPE_RESERVED_BSE_LAST	(48)
</pre>
<p>
Last fundamental type number reserved for BSE.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2834077"></a><h3>
<a name="G-TYPE-RESERVED-USER-FIRST:CAPS"></a>G_TYPE_RESERVED_USER_FIRST</h3>
<a class="indexterm" name="id2834090"></a><pre class="programlisting">#define G_TYPE_RESERVED_USER_FIRST	(49)
</pre>
<p>
First available fundamental type number to create new fundamental 
type id with <a class="link" href="gobject-Type-Information.html#G-TYPE-MAKE-FUNDAMENTAL:CAPS"><code class="function">G_TYPE_MAKE_FUNDAMENTAL()</code></a>.
</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id2834124"></a><div class="refsect2" lang="en"><a name="id2834125"></a></div>
<hr>
<div class="refsect2" lang="en"><a name="id2834126"></a></div>
</div>
</div>
</body>
</html>
